Raspberry Pi Help Needed

baksteen8168

Useful Idiot
LV
48
 
Joined
23/5/14
Posts
3,297
Awards
35
Location
Benoni
Gday Fellow Forumites

I started a Raspberry Pi project and I seem to have run into a little problem.

I installed an Audio Hat (IQAudio Pi-DAC+) and managed to get the Pi to see the board. However, I can for the life of me NOT get the bloody thing to unmute.

alsamixer command brings back "cannot open mixer: Invalid argument"

Please help me:facepalm:
 
The only guy I can think of would be @blujeenz .
I know there's other members I just can't get to their names right now.
 
I've never had any joy with Pi, I have 3 blown boards in the cupboard. :-(

So I googled a solution. https://askubuntu.com/questions/765396/alsamixer-cannot-open-mixer-invalid-argument
I read that ALSA has master audio channel muted by defaut after install. So I tried to unmute it using alsamixer command. Unfortunately it didn't work due to Invalid argument error.

The search continued and I stumbled upon a website that has always been in search results but I paid no attention to it. It mentioned some file called .asoundrc. I looked for it and didn't find it on my system. Another website said that you should manually create it (/home/username/.asoundrc for current user only, or /etc/asound.conf if you want to keep these settings for all users) and paste the following content in there:

pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}

After that I was able to open alsamixer. However, the screen was empty and didn't show any volume settings as expected.

Then I opened list of my sound cards with
cat /proc/asound/cards


It turned out that my laptop has two sound cards:

0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xf0344000 irq 28
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xf0340000 irq 16

Card 0 was set by default in the beforementioned .asoundrc file. I experimented and changed 0 to 1. Afterwards alsamixer showed the volume settings I needed.

Master channel was muted by default, as ALSA documentation warned. It was indicated by the letters MM above the Master label. I used the ↑ arrow key to increase the volume to 100%. But this wasn't enough. I also had to press the M key to unmute Master channel since increasing the volume does not unmute it automatically (taken from here). After pressing M the MM letters became OO which meant the channel was unmuted. And the sound has FINALLY appeared! Press Esc to exit alsamixer and enjoy the variety of sounds and music on your Ubuntu, Kubuntu or whatever distro it is that you are using.

Important note: do NOT use sudo alsa force-reload command at all (as some websites suggest) because it mutes the Master channel again and you will have to repeat the unmuting procedure!
 
Back
Top