Audio goes through HDMI instead of AUX cable.

I am using balenaSound on a Raspberry Pi 3 Model B and my audio goes to HDMI instead of an AUX cable. Why is it not going through to AUX?

You might need to configure which audio output balenaSound uses by defining the AUDIO_OUTPUT env var https://github.com/balenablocks/audio#environment-variables

I went to HEADPHONES and there was no sound. I went to RPI_HEADPHONES and it couldn’t connect to audio block, and audio was showing a list of commands.

Hi Jose,

Are you using the 32-bit OS for your Raspberry PI 3? We’ve been getting a couple of reports of issues with sound with the 64-bit OS.

Thanks
Felipe

I am using the 32-bit OS for my Raspberry Pi 3.

Hi Jose, could you please confirm you’ve set the device environment variable AUDIO_OUTPUT with the value RPI_HEADPHONES and this is reflected when you shell into the audio container and run env?

02.11.20 23:56:46 (+0000)  audio  Usage: amixer <options> [command]
02.11.20 23:56:46 (+0000)  audio  
02.11.20 23:56:46 (+0000)  audio  Available options:
02.11.20 23:56:46 (+0000)  audio    -h,--help       this help
02.11.20 23:56:46 (+0000)  audio    -c,--card N     select the card
02.11.20 23:56:46 (+0000)  audio    -D,--device N   select the device, default 'default'
02.11.20 23:56:46 (+0000)  audio    -d,--debug      debug mode
02.11.20 23:56:46 (+0000)  audio    -n,--nocheck    do not perform range checking
02.11.20 23:56:46 (+0000)  audio    -v,--version    print version of this program
02.11.20 23:56:46 (+0000)  audio    -q,--quiet      be quiet
02.11.20 23:56:46 (+0000)  audio    -i,--inactive   show also inactive controls
02.11.20 23:56:46 (+0000)  audio    -a,--abstract L select abstraction level (none or basic)
02.11.20 23:56:46 (+0000)  audio    -s,--stdin      Read and execute commands from stdin sequentially
02.11.20 23:56:46 (+0000)  audio    -R,--raw-volume Use the raw value (default)
02.11.20 23:56:46 (+0000)  audio    -M,--mapped-volume Use the mapped volume
02.11.20 23:56:46 (+0000)  audio  
02.11.20 23:56:46 (+0000)  audio  Available commands:
02.11.20 23:56:46 (+0000)  audio    scontrols       show all mixer simple controls
02.11.20 23:56:46 (+0000)  audio    scontents     show contents of all mixer simple controls (default command)
02.11.20 23:56:46 (+0000)  audio    sset sID P      set contents for one mixer simple control
02.11.20 23:56:46 (+0000)  audio    sget sID        get contents for one mixer simple control
02.11.20 23:56:46 (+0000)  audio    controls        show all controls for given card
02.11.20 23:56:46 (+0000)  audio    contents        show contents of all controls for given card
02.11.20 23:56:46 (+0000)  audio    cset cID P      set control contents for one control
02.11.20 23:56:46 (+0000)  audio    cget cID        get control contents for one control
02.11.20 23:56:51 (+0000)  audio  
02.11.20 23:56:51 (+0000)  audio  --- Audio ---
02.11.20 23:56:51 (+0000)  audio  Starting audio service with settings:
02.11.20 23:56:51 (+0000)  audio  - Pulse log level: NOTICE
02.11.20 23:56:51 (+0000)  audio  - Default output: RPI_HEADPHONES
02.11.20 23:56:51 (+0000)  audio  
02.11.20 23:56:51 (+0000)  audio  Detected audio cards:
02.11.20 23:56:51 (+0000)  audio  0 ALSA bcm2835_alsa-bcm2835ALSA
02.11.20 23:56:51 (+0000)  audio  
02.11.20 23:56:51 (+0000)  audio  
02.11.20 23:56:51 (+0000)  airplay  Waiting for audioblock to start...
02.11.20 23:56:56 (+0000)  sound-supervisor  Error connecting to audio block - Retry failed: connect ECONNREFUSED 192.168.0.100:4317
02.11.20 23:56:57 (+0000)  airplay  Waiting for audioblock to start...
02.11.20 23:57:01 (+0000)  audio  Invalid card number.
02.11.20 23:57:01 (+0000)  audio  Usage: amixer <options> [command]
02.11.20 23:57:01 (+0000)  audio  
02.11.20 23:57:01 (+0000)  audio  Available options:
02.11.20 23:57:01 (+0000)  audio    -h,--help       this help
02.11.20 23:57:01 (+0000)  audio    -c,--card N     select the card
02.11.20 23:57:01 (+0000)  audio    -D,--device N   select the device, default 'default'
02.11.20 23:57:01 (+0000)  audio    -d,--debug      debug mode
02.11.20 23:57:01 (+0000)  audio    -n,--nocheck    do not perform range checking
02.11.20 23:57:01 (+0000)  audio    -v,--version    print version of this program
02.11.20 23:57:01 (+0000)  audio    -q,--quiet      be quiet
02.11.20 23:57:01 (+0000)  audio    -i,--inactive   show also inactive controls
02.11.20 23:57:01 (+0000)  audio    -a,--abstract L select abstraction level (none or basic)
02.11.20 23:57:01 (+0000)  audio    -s,--stdin      Read and execute commands from stdin sequentially
02.11.20 23:57:01 (+0000)  audio    -R,--raw-volume Use the raw value (default)
02.11.20 23:57:01 (+0000)  audio    -M,--mapped-volume Use the mapped volume
02.11.20 23:57:01 (+0000)  audio  
02.11.20 23:57:01 (+0000)  audio  Available commands:
02.11.20 23:57:01 (+0000)  audio    scontrols       show all mixer simple controls
02.11.20 23:57:01 (+0000)  audio    scontents     show contents of all mixer simple controls (default command)
02.11.20 23:57:01 (+0000)  audio    sset sID P      set contents for one mixer simple control
02.11.20 23:57:01 (+0000)  audio    sget sID        get contents for one mixer simple control
02.11.20 23:57:01 (+0000)  audio    controls        show all controls for given card
02.11.20 23:57:01 (+0000)  audio    contents        show contents of all controls for given card
02.11.20 23:57:01 (+0000)  audio    cset cID P      set control contents for one control
02.11.20 23:57:01 (+0000)  audio    cget cID        get control contents for one control
02.11.20 23:57:02 (+0000)  airplay  Waiting for audioblock to start...
02.11.20 23:57:05 (+0000) Service exited 'audio sha256:3e112f4c2e8a620e915e539a4bdc4720b40fdf5ba9a25f37f1ae402cd2a27280'```

Are you able to grant support access to the device please and we’ll take a look…

You got access for 1 week.

Can you please share the device uuid

ef47e50 is the device uuid.

A file has been uploaded using Jellyfish: https://jel.ly.fish/afa20924-be2a-4182-8bab-8f561e55da89

The audio services appears to be trying to use an invalid audio device:

02.11.20 16:50:31 (-0800) Restarting service 'audio sha256:3e112f4c2e8a620e915e539a4bdc4720b40fdf5ba9a25f37f1ae402cd2a27280'
02.11.20 16:50:26 (-0800)  audio  Invalid card number.
02.11.20 16:50:26 (-0800)  audio  Usage: amixer <options> [command]
02.11.20 16:50:26 (-0800)  audio  
...

… even though there seems to be a valid audio card there:

root@79d91f757b02:/usr/src# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I’ll raise this internally to see if we are aware/able to reproduce and advise…

Did you find a solution yet?

This works on AUTO by the way.

Hi Jose, balenaSound maintainer here. I’ve just confirmed this is a bug, clearly not the expected behaviour. I think this might be because of recent changes to the upstream kernel module for the Pi sound card.
Can you confirm what version of balenaOS you are running? You can check the dashboard to find out.

I don’t have access to the dashboard right now, its the recommended version of balenaOS as of 2 days ago.

Thanks that’s good enough. I’ve tracked this down to a change made to default parameters on the sound kernel module. This shouldn’t be a complex thing to fix, but I’m tracking down the change to first figure out the impact.
I’ve created a GitHub issue to track this problem here: https://github.com/balenablocks/audio/issues/39

I’ll let you know once I get it sorted or you can track progress on that GH issue.

I need to know when this gets fixed. Also, I granted support access for you guys.

I’ve attached this forum thread to the relevant GitHub issue. Once I close the issue and release the fix you should get notified in this thread by me or one of my colleagues.