Discussion
Audio out mode setting (CB for Banana Pi image)
18
34071
View: 34071|Reply: 18
|
[Discussion]
Audio out mode setting (CB for Banana Pi image)
[Copy link]
|
|
Post Last Edited by tony_zhang at 2014-5-4 16:17
There are two audio devices HDMI and headphone in the Banana Pi.There are two audio devices named sunxi-sndhdmi and sunxi-CODEC in the system. The sound output is send out from HDMI by default . You can adjust volume and other configuration ,use Ctrl + z to save it.
To set sound care being sunxi-CODEC modify /etc/asound.conf to turn on the headphone.- pcm.!default {
- type hw
- card 0 //If you want to set HDMI as output ,turn 0 to 1.
- device 0
- }
- ctl.!default {
- type hw
- card 0 //If you want to set HDMI as output ,turn 0 to 1.
- }
Copy the Code If Plug in the headphone and type:The sound "sound left,sound right,sound left" will output from headphone.
Let bananapi speak by package named espeak :- sudo apt-get install espeak
- espeak "hello" //say: hello
- espeak "hello_bananapi" //say: hello banana pi
Copy the Code |
|
|
|
|
|
|
|
Reply 1# tony_zhang
Hi guys,
tried to have the Banana Pi give audio via HDMI and came across your hints above. I started the AlsaMixer-tool but neither the F-Keys work properly (F4 gives me the help instead of F1 and all other F-keys seem to have no effect) nor can I change the sound-card, i.e. from sunxi-CODEC to the HDMI-output.
Why is that so? To me the SW appears to be v1.0.25 - any hints I have missed?
The raspberry-way with editing the config.txt obviously does not work.
Thanx and best regards
Bjoern |
|
|
|
|
|
|
|
Hi, below an update:
I created /etc/asound.conf (not present in your distibution?) to turn on the headphone and in a second step I tried HDMI. After each code-change of asound.conf I rebooted but neither worked.
Code Step 1 was:
pcm.!default {
type hw
card 0 //If you want to set HDMI as output ,turn 0 to 1.
device 0
}
ctl.!default {
type hw
card 0 //If you want to set HDMI as output ,turn 0 to 1.
}
Step 2 was
pcm.!default {
type hw
card 1 //If you want to set HDMI as output ,turn 0 to 1.
device 0
}
ctl.!default {
type hw
card 1 //If you want to set HDMI as output ,turn 0 to 1.
}
Plugging in the earphones -or alternatively trying over HDMI- and issuing the command
speaker-test -twav -c2
gave me folowing error:
speaker-test 1.0.25
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib pcm_hw.c:1466 _snd_pcm_hw_open) Unknown field //If
Playback open error: -22,Invalid argument
I'm thankful for any help,
best regards Bjöern |
|
|
|
|
|
|
|
Post Last Edited by Fab at 2014-9-8 17:45
I am struggling to get audio working too with hdmi (have not tried with speakers). I use Arch. In uEnv.txt I setI typebut still no sound. |
|
|
|
|
|
|
|
same for me, only sunxi-CODEC available in last Lubuntu |
|
|
|
|
|
|
|
what does "cat /proc/asound/cards" reveal? |
|
|
|
|
|
|
|
Reply 6# sashijoseph
0 [sunxicodec ]: sunxi-CODEC - sunxi-CODEC
sunxi-CODEC Audio Codec
no hdmi driver present |
|
|
|
|
|
|
|
Lubuntu 3.1.1. set card from 0 to 1.
reboot
-> sudo alsamixer not working anymore: Error while opening Mixer Device. File or directory not found.
What's wrong here? |
|
|
|
|
|
|
|
Post Last Edited by Kulli at 2014-10-2 02:18
Hey,
the method described in Post #1 doesn't work for me either. The file was already changed, but I cannot hear anything comming out of the headphones connector.
The only think which works isbut I cannot hear anything else.
What could be the problem? I am using Lubuntu 3.1.1.
Thanks! |
|
|
|
|
|
|
|
I can not get any sound on this version either, I want it through the headphone jack this time. |
|
|
|
|
|
|