alsamixer - A Tip for Volume Control

Having trouble with your GBZ build? Ask your questions here!
Post Reply
3kidsinaustin
Posts: 27
Joined: Sat Dec 29, 2018 8:21 pm
Been thanked: 7 times

alsamixer - A Tip for Volume Control

Post by 3kidsinaustin » Mon Apr 15, 2019 2:32 pm

This might be somewhere in the wiki or elsewhere on this forum, but I missed it when doing my first GBZ build. When using a USB audio card for sound, using the command "alsamixer" (without quotes) lets you set the volume coming from the pi. I'm retrofitting a personal DVD player with a Pi zero and thought I'd need to add in tiny amp to better power the nicer, stereo speakers. Came across this site just in hopes there was a setting I could change - and eureka!

The site I found is: https://computers.tutsplus.com/articles ... -mac-55876

I had put an amp into my GBZ and now bet I could have just upped the volume through the alsamixer command.

Hope this helps!
First Build Done! viewtopic.php?f=43&t=7444

User avatar
VeteranGamer
Posts: 1738
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 528 times
Been thanked: 909 times

Re: alsamixer - A Tip for Volume Control

Post by VeteranGamer » Mon Apr 15, 2019 3:42 pm

Thanks...


At first glance it seem a bit long winded....
(But this is coming from a RetroPie stand point)


The setup for USB audio is very easy...

here is how I enable USB audio

(i prefer to SSH into the system)

Code: Select all

sudo nano .asoundrc

you'll be present with a blank screen

Code: Select all

pcm.card1 {
  type hw card 1
}

ctl.card1 {
  type hw card 1
}

pcm.!default card1


Save and exit

and thats it



You can also adjust the volume via the RetroPie menu, just select Audiosettings...
(that takes you to a menu where you can get into the alsamixer)

W8SR5Qu.jpg
W8SR5Qu.jpg (2.84 MiB) Viewed 3498 times
usbaudio7.png
usbaudio7.png (20.67 KiB) Viewed 3498 times




.
Last edited by VeteranGamer on Tue Apr 16, 2019 1:49 am, edited 3 times in total.

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: alsamixer - A Tip for Volume Control

Post by infinitLoop » Mon Apr 15, 2019 4:23 pm

Here it is:
viewtopic.php?t=144

and if you have a video splashscreen, and you have no sound, do this:

Code: Select all

sudo nano /opt/retropie/supplementary/splashscreen/asplashscreen.sh
find and change:
omxplayer -o both -b --layer 10000 "$line"
to:
omxplayer -o alsa -b --layer 10000 "$line"

User avatar
VeteranGamer
Posts: 1738
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 528 times
Been thanked: 909 times

Re: alsamixer - A Tip for Volume Control

Post by VeteranGamer » Tue Apr 16, 2019 1:48 am

infinitLoop wrote:
Mon Apr 15, 2019 4:23 pm
Here it is:
viewtopic.php?t=144

thanks....

but you've kinda linked the exact same method as the link 3kidsinaustin posted....
(but please use which ever makes it more easier)




.

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: alsamixer - A Tip for Volume Control

Post by infinitLoop » Tue Apr 16, 2019 7:43 am

VeteranGamer wrote:
Tue Apr 16, 2019 1:48 am
infinitLoop wrote:
Mon Apr 15, 2019 4:23 pm
Here it is:
viewtopic.php?t=144

thanks....

but you've kinda linked the exact same method as the link 3kidsinaustin posted....
(but please use which ever makes it more easier)

.
Thanks. Haven’t seen that approach. Seems about the same for steps (create a text file, copy in the contents). Is there any advantage over the way?

User avatar
VeteranGamer
Posts: 1738
Joined: Thu Jan 26, 2017 11:12 am
Location: London, UK
Has thanked: 528 times
Been thanked: 909 times

Re: alsamixer - A Tip for Volume Control

Post by VeteranGamer » Tue Apr 16, 2019 8:32 am

infinitLoop wrote:
Tue Apr 16, 2019 7:43 am
VeteranGamer wrote:
Tue Apr 16, 2019 1:48 am
infinitLoop wrote:
Mon Apr 15, 2019 4:23 pm
Here it is:
viewtopic.php?t=144

thanks....

but you've kinda linked the exact same method as the link 3kidsinaustin posted....
(but please use which ever makes it more easier)

.
Thanks. Haven’t seen that approach. Seems about the same for steps (create a text file, copy in the contents). Is there any advantage over the way?

it is in a round about way the same....

firstly... for a start its not as long winded
(in both the methods linked you go around the houses, just to enable USB audio, when it should only take about a minute) .....

secondly, it shouldn't/won't kick up any errors (providing everything is connected properly)

thirdly...
Volume control can be done via the Retropie menu (now if your using something other than RetroPie this will differ)
there really isn't any need to do it via the terminal or SSH into the system to do this (that's just over complicating things)



if that isn't a advantage, well......
(as always, go with the method that's easiest for the user... that's all that counts)



.

User avatar
infinitLoop
Posts: 536
Joined: Mon Dec 24, 2018 11:46 am
Location: Portland, OR
Has thanked: 222 times
Been thanked: 199 times
Contact:

Re: alsamixer - A Tip for Volume Control

Post by infinitLoop » Tue Apr 16, 2019 8:54 am

hm. still not really seeing a big advantage, but i'm pretty dense. i'll try it next time i do usb audio. i don't usually get errors doing the other approach, except sometimes retropie doesn't see it at first. switching to "speaker" as the audio device usually fixes the retropie sound or the "lvl0 mixer" error msg (maybe that's the error you're referring to?)

i just do the part in the other steps to create the alsa-base.conf file and set the order of the devices, so it not really that much longer, but nice to understand the other parts. once i saw a usb card with a different identifier, but usually i don't even have to edit what i put in it.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest