Jump to content

Recommended Posts

Posted

Hi! Recently I've tried Armbian 22.11 Jammy for my banana Pi M5. Initial setup without any error message. When I do the speaker-test but no sound output. Can I know how to add the sound card driver into the OS? Thanks

Posted

@ricardovasc and @hkkok be VERY CAREFULL USING the amixer spell from @MichaIng:
 

# Reset and re-initiate ALSA mixer states
rm /var/lib/alsa/asound.state
alsactl init
# Enable 3.5mm output
amixer -c 0 set 'TOACODEC OUT EN' 'on'
# Use I2S B as source for 3.5mm output, I2C A is somehow not usable
amixer -c 0 set 'TOACODEC SRC' 'I2S B'
# Use ALSA device 0 as input for I2S B
amixer -c 0 set 'TDMOUT_B SRC SEL' 'IN 0'
# Enable I2S B (SRC 2) on device 0 (_A)
amixer -c 0 set 'FRDDR_A SRC 2 EN' 'on'
# Set output channels for device 0 (_A)
amixer -c 0 set 'FRDDR_A SINK 1 SEL' 'OUT 0'
amixer -c 0 set 'FRDDR_A SINK 2 SEL' 'OUT 1'
amixer -c 0 set 'FRDDR_A SINK 3 SEL' 'OUT 2'
# Set master volume to 85%
amixer -c 0 set 'ACODEC' '85%'


I have burnt my usb-audio device attached to so UNPLUG ANY USB AUDIO adapter and stuff as it seems to have burn by conflicting during the process.

You have been warned,

                                                     SoSIe

 

Posted (edited)

@SoSie

What do you mean by "burn"?

 

You can always reset all mixer settings via

rm /var/lib/alsa/asound.state
alsactl init

 

The commands explicitly change settings for audio device/card 0 (-c 0), so check first whether onboard audio is card 0 via

aplay -l

 

Usually it should be, but I read on recent kmod changelog (Debian Bookworm and above, probably Ubuntu Jammy already)

Zitat

* Allow USB audio devices to be the first sound device, because nowadays they are more common and this is what the other distributions do.

 

Not sure how kmod shall have an effect on the order in which the kernel detects sound devices, but always good to double check.

 

On USB DACs, the amixer commands should mostly just fail since either the controls are invalid, or the values. USB audio is not internally attached via I2S etc.

Edited by MichaIng
Posted

@SoSie

And did you try to reset mixer settings as I suggested above? And it doesn't work on other host hardware either? I still do not believe it is possible to physically damage a USB device by changing ALSA mixer settings of an internal sound card. Probably just a coincidence, but I lack knowledge to rule it out for certain. At least we offer this setup (switching between HDMI and analogue jack) to a few hundred users and didn't receive such a feedback yet.

 

@ricardovasc

Did you try the linked/pasted steps (at best while not having any USB DAC attached)?

Posted

I have a similar Issue. Banana Pi M5, with Armbian Jammy XFCE desktop. the alsamixer gui shows only a dummy output.
aplay -l shows the following

 

root@bananapim5:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: BPIM5 [BPI-M5], device 0: fe.dai-link-0 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: BPIM5 [BPI-M5], device 1: fe.dai-link-1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: BPIM5 [BPI-M5], device 2: fe.dai-link-2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 

alsactl init creates the following output, without changing anything on the aplay output.

root@bananapim5:~# alsactl init
alsa-lib parser.c:2373:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'.
alsa-lib main.c:1412:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "axg-sound-card" "" "" "" ""
Hardware is initialized using a generic method
alsa-lib parser.c:2373:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'.
alsa-lib main.c:1412:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Found hardware: "USB-Audio" "USB Mixer" "USB1915:1025" "" ""
Hardware is initialized using a generic method

 

I need HDMI Audio, but so far I could find no way to enable any audio output.

Posted

For HDMI audio use following commands:

 

amixer sset 'FRDDR_A SINK 1 SEL' 'OUT 1'
amixer sset 'FRDDR_A SRC 1 EN' on
amixer sset 'TDMOUT_B SRC SEL' 'IN 0'
amixer sset 'TOHDMITX' on
amixer sset 'TOHDMITX I2S SRC' 'I2S B'
alsactl store

 

Posted

The amixer commands solved the issue for the 3.5mm jack for me.

 

However, a few "pops" are audible between silence and output e.g. between tracks on an album. Can anyone else reproduce this? Perhaps power-saving related?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines