eduardofilo / RG350_adam_image

310 stars 37 forks source link

Sound too low on rg300x and fresh Adam 2.0 #263

Closed patricia-atenea closed 2 years ago

patricia-atenea commented 2 years ago

What happened?

First, I want to thank you for all the hard work put in here and the new release of the adam image.

I've installed a new fresh image of Adam 2.0 on my rg300X and it works great, except for the level of sound. It is extremely low in all emulators. The previous version, Adam 1.4.2 is pretty good, though, so I guess this is some sort of configuration problem.

Device

RG300X

Version

v2.0

patricia-atenea commented 2 years ago

By the way, I couldn't chose the correct version (v2.0) when creating the issue, it was not available on the list.

eduardofilo commented 2 years ago

OK, I will test on my RG350M which is the closest machine I think. Thanks for reporting back.

By the way, I couldn't chose the correct version (v2.0) when creating the issue, it was not available on the list.

I forgot to add the new version to the template. It's solved now, thanks again.

eduardofilo commented 2 years ago

Hi Patricia.

I have been analyzing and apparently the problem is that in the version of the system installed, a new Mixer channel has been added that reduces the final volume by 31% of the total:

v2 0

It did not exist in the previous system:

v1 4 2

I had not noticed the problem because I work on an RG280V and on that machine that new Mixer channel is set to 100% by default.

Because of this and other problems that have arisen in v2.0 of the image, I am going back to an earlier system in a new revision that I hope to be able to release in a few days.

patricia-atenea commented 2 years ago

Thank you Eduardo!

Sakitoshi commented 2 years ago

i found the same problem on my rg300x, an immediate solution is to add an init.d script to override the _/etc/init.d/S90volume.sh script that sets the mixer volume every boot. since it can't be overwritten, i duplicated that script and put it in _/media/data/local/etc/init.d/S30newvolume.sh and changed the line amixer set Mixer Playback 45% which weirdly sets it to 31% (-17.0 dB) to amixer set Mixer Playback 23 that sets it to 62% (-8.0 dB) instead. didn't make it go all the way to 100% because i thought the lowest volume with that value was too high, but feel free to change the number as you see fit (between 0 and 31). here is the full script so you can copy/paste it directly, you'll need root access because the /media/data/local/etc/init.d/ folder is owned by root.

#!/bin/sh
#
# Simple script to load/store ALSA parameters (volume...)
#

VOLUME_STATEFILE=/usr/local/etc/volume.state
CONTROL=PCM

case "$1" in
    start)
        psplash_write "Loading sound volume..."
        if [ -f $VOLUME_STATEFILE ]; then
            /usr/bin/amixer set $CONTROL `cat $VOLUME_STATEFILE`
        fi

        MODEL=$(sed -n 's/\(.*\)ingenic.*/\1/p' /sys/firmware/devicetree/base/compatible)
        case "$MODEL" in
            wolsen,pocketgo2v2|ylm,rg280m|ylm,rg300x|ylm,rg350|ylm,rg350m)
                amixer set Mixer Playback 23
                ;;
            *)
                ;;
        esac
        ;;
    stop)
        psplash_write "Storing sound volume..."
        amixer get $CONTROL | sed -n 's/.*Front .*: Playback \([0-9]*\).*$/\1/p' | paste -d "," - - > $VOLUME_STATEFILE
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
esac

exit $?
eduardofilo commented 2 years ago

Thank you @Sakitoshi. I will consider putting the latest version of ODbeta together with this script instead of rolling back to the previous version.

eduardofilo commented 2 years ago

v2.1 created. We are back to the previous situation with the system 1.4.2 which does not have this new Mixer channel.