Bananian

analog audio

6 8849
gbi  
Hi All,

I'm trying to use the analog audio out and in/microphone.

Doing a
  1. cat /proc/asound/cards
  2. 0 [sunxicodec     ]: sunxi-CODEC - sunxi-CODEC
  3.                       sunxi-CODEC  Audio Codec
Copy the Code
shows the above results. But when trying to do either amixer or alsamixer I get
  1. amixer   
  2. amixer: Mixer attach default error: No such file or directory
  3. 1 root@bapi ~ # alsamixer                                                    :(
  4. cannot open mixer: No such file or directory
Copy the Code
There are some sound related kernel modules:
  1. # lsmod
  2. Module                  Size  Used by
  3. snd_aaci                8476  0
  4. snd_ac97_codec        106279  1 snd_aaci
  5. ac97_bus                1256  1 snd_ac97_codec
  6. sg                     27461  0
  7. cpufreq_stats           3623  0
  8. cpufreq_userspace       3524  0
  9. cpufreq_conservative     5712  0
  10. cpufreq_powersave       1242  0
Copy the Code
But in dmesg I can't see any sound or alsa related info.

Q1: is anybody running 14.09 and using the analog audio in/out ?
Q2: does 14.09 support (analog) sound at all ?
Q3: what am I doing wrong ? (if at all)

Thanks in advance, gbi
Tonband  
Hi gbi,

please provide the following information:
Have you installed pulseaudio?
Test it, by type "pulseaudio" in terminal.
If yes, please provide /etc/pulse/default.pa

Please provide us /etc/asound.conf

Analog audio works 100%, maybe something is misconfigured.

gbi  
Edited by gbi at 2014-10-21 14:06
Tonband replied at 2014-10-20 14:05
Hi gbi,

please provide the following information:


Hi Tonband,

thanks for your reply :-)

1. No pulseaudio, was never installed. I was never a fan of it. Only alsa.
2. /etc/asound.conf is as it was after installation. I'll post it as soon as I can reach my BaPi

Are the kernelmodules in posting 1 the correct ones ?

cheers

gbi  
Edited by gbi at 2014-10-23 13:46

Hi Tonband,

content of my /etc/asound.conf is:
  1. pcm.!default {
  2.         type hw
  3.         card 1 # 1 == HDMI, 0 == analog
  4.         device 0
  5. }
  6. ctl.!default {
  7.         type hw
  8.         card 1 # 1 == HDMI, 0 == analog
  9. }
Copy the Code
In /var/log/syslog and other logfiles I found some entries like:
  1. Jan  1 01:02:19 bapi kernel: [   13.982354] ALSA device list:
  2. Jan  1 01:02:19 bapi kernel: [   13.994229]   #0: sunxi-CODEC  Audio Codec
Copy the Code
Time is not ok, but thats another prob ..

And this is the content of /dev/snd:
  1. drwxr-xr-x 2 root root       60 Jan  1  2010 by-path/
  2. crw-rw---T 1 root audio 116,  4 Jan  1  2010 controlC0
  3. crw-rw---T 1 root audio 116,  3 Jan  1  2010 pcmC0D0c
  4. crw-rw---T 1 root audio 116,  2 Jan  1  2010 pcmC0D0p
  5. crw-rw---T 1 root audio 116, 33 Jan  1  2010 timer
Copy the Code
Can you (or everbody who is willing to) help me solve the prob ?

Thanks in advance


Edit:

I was able to locate the prob. In /etc/asound.conf is the wrong device configured (for my case), it must be 0, not 1. I usually have nothing connected to HDMI, so there seems to be no device for it, and so it can't be used/opened, and so amixer terminates with "No such file or directory". I did an 'strace amixer' and was able to see that amixer tries to open the nonexistent device /dev/snd/controlC1 . I was not aware of this context.

So far so good. For the records

Tonband  
Damm, too late. Yes i wanted to say the same. Turn 1 to 0 in asound.conf

Hi. I also have problem with jack audio.
1 root@bananapi ~ # cat /proc/asound/cards                                                                                                              
0 [sunxicodec     ]: sunxi-CODEC - sunxi-CODEC
                      sunxi-CODEC  Audio Codec
root@bananapi ~ # amixer
amixer: Mixer attach default error: Invalid argument
1 root@bananapi ~ # pulseaudio                                                                                                                          
zsh: command not found: pulseaudio
127 root@bananapi ~ # cat  /etc/asound.conf                                                                                                            
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.
  }

I have no idea how to fix that :/.

MrDarkenRahl, just remove slashes and text after it
  1. pcm.!default {
  2.     type hw
  3.     card 0
  4.     device 0
  5. }
  6. ctl.!default {
  7.     type hw
  8.     card 0
  9. }
Copy the Code
and run
  1. sudo speaker-test -twav -c2
Copy the Code
It's helps for me. May be help you. ))

You have to log in before you can reply Login | Sign Up

Points Rules