Page 1 of 1

Audio from 3.5mm jack after 2nd HDMI connected

Posted: Thu Aug 06, 2020 8:47 pm
by pneumoniastadium
My set-up is currently Raspberry Pi Model 4 connected through HDMI ports to a TV (HDMI-1) and a projector (HDMI-2). I have the 3.5mm audio jack connected to/speakers.

When all is as described above I cannot get audio from the 3.5mm jack. I can get audio from each HDMI device without issue as both have internal speakers.

After trying different configurations, I have found that I get audio from the 3.5mm jack when HDMI-2 (projector) is disconnected and pi rebooted, so that only HDMI-1 is connected.

I have tried

Code: Select all

sudo amixer cset numid=3 1
without success as i get this returned:

Code: Select all

amixer: Cannot find the given element from control default


I was having these issues and some others relating to my display when using, Raspian (even tried forcing audio through 3.5mm using the raspi-config utility) so I switched from Raspian to Ubuntu-mate. I had the same audio issue in both operating systems. I am currently running Ubuntu Mate.

i have also tried -

Code: Select all

sudo apt-get install --reinstall alsa-base pulseaudio

Code: Select all

sudo alsa force-reload
I have tried testing speakers using ubuntu-mate's graphical sound settings, hardware tab - does not work.
I used alsamixer to ensure that the headphones volume was turned up to full and not muted.

I have tried Google and I have not found a solution. I am new to Linux and Raspberry Pi.


Thanks for your help.

Re: Audio from 3.5mm jack after 2nd HDMI connected

Posted: Fri Aug 07, 2020 8:23 pm
by pneumoniastadium
bump.

Re: Audio from 3.5mm jack after 2nd HDMI connected

Posted: Fri Aug 07, 2020 9:11 pm
by KenT2
The method of selecting audio device has changed recently

https://www.raspberrypi.org/blog/latest ... -may-2020/

The new alsa devices can be obtained from this code which I use for mplayer

Code: Select all

                    if self.mplayer_audio in ('hdmi','hdmi0'):
                        driver_option=' -ao alsa:device=plughw=b1.0 '
                    elif self.mplayer_audio == 'hdmi1':
                        driver_option=' -ao alsa:device=plughw=b2.0 '
                    elif self.mplayer_audio in ('alsa','USB'):
                        driver_option=' -ao alsa:device=plughw=Device.0 '
                    elif self.mplayer_audio in ('local','A/V'):
                        driver_option=' -ao alsa:device=plughw=Headphones.0 '