[SOLVED] Analog Audio not Working on A20 with Debian

Started by gippy73, October 14, 2014, 08:16:50 PM

Previous topic - Next topic

gippy73

I've not tried with HDMI, since my Olinuxino act as a micro server and thus it's not connected to a video.

The problem is that when I let it play something (with mplayer) I can't ear anything on the output.

I've already tried to modify /etc/asound.conf with


pcm.mixer {
[...]
    slave {
[...]
        pcm "hw:0,0"


Today I have also changed uImage with another one which should support PWM (the one to allow installation on NAND, which I succeeded), but I'm still unable to have an audio output.

What can I try furthermore?

Thanks in advance.

Cosik

#1
Do you have alsamixer?

If yes did you check if this element is enabled/disabled in mixer?

Also, did you read this topic https://www.olimex.com/forum/index.php?topic=2856.msg11934#msg11934 ? Maybe it will help also.


gippy73

Quote from: Cosik on October 14, 2014, 08:55:31 PM
Do you have alsamixer?
Yes

Quote from: Cosik on October 14, 2014, 08:55:31 PM
If yes did you check if this element is enabled/disabled in mixer?

What element?

Quote from: Cosik on October 14, 2014, 08:55:31 PM
Also, did you read this topic https://www.olimex.com/forum/index.php?topic=2856.msg11934#msg11934 ? Maybe it will help also.

I've read it now: I have the same problem of the first post, but specifying de device (as in 2nd post) doesn't solve it! :(
I've also modified (again) asound.conf with what written on other posts, but still without solving...

This is the output:

speaker-test -D hw:0,0 -twav -c2

speaker-test 1.0.25

Playback device is hw:0,0
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card
Playback open error: -2,No such file or directory


Trying without specifying the HW parameter gives:

speaker-test -tpink -c2                                                                                   

speaker-test 1.0.25

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_hw.c:1466:(_snd_pcm_hw_open) Unknown field slave
Playback open error: -22,Invalid argument


This suggest me that my asound.conf is wrong... This is its content:

pcm.dmixer {
      type dmix
      ipc_key 1024
      ipc_key_add_uid false
      ipc_perm 0660
      slave {
          pcm "hw:0,0"
          rate 48000
          channels 2
          period_time 0
          period_size 1024
          buffer_time 0
          buffer_size 4096
      }
  }

pcm.!default {
      type plug
      slave.pcm "dmixer"
      type hw
      card 0
      device 0
  }

pcm.!hdmi-remap {
      type asym
      playback.pcm {
          type plug
          slave.pcm "remap-surround71"
      }
  }

pcm.!remap-surround71 {
      type route
      slave.pcm "hw:0,0"
      ttable {
          0.0= 1
          1.1= 1
          2.4= 1
          3.5= 1
          4.2= 1
          5.3= 1
          6.6= 1
          7.7= 1
      }
  }

ctl.!default {
      type hw
      card 0
  }


Finally I've tried deleting (after a backup ;--) asound.conf and it didn't give any error, but... I can still hear nothing.

gippy73


gippy73

#5
Hold on!!!

I've been able to hear the test noise configuring asound.conf according to this page (reported on the post suggested by You):
http://linux-sunxi.org/Audio_Codec
but replacing card 1 with card 0

Now the problem is that it works only with root privileges :D

Same if I try launching alsamixer.

While launching mplayer doesn't give any permission error but no sound heard.
It works with sudo.

So the final problem now is about permission.

I'm gonna find where is the jam, but if someone has a tip...

Thanks again.

Cosik

So now you should check mplayer configuration. If speaker test is working on yours Linux then problem is with audio config in mplayer.

gippy73

#7
Thanks Cosik,

it seems to be a permission concerning problem.

I've added my user to group audio (after "pulse" user) and it worked! :) :) :)


Thanks to everyone!

For other's convenience, this is the right content for /etc/asound.conf:

pcm.!default {
  type hw
  card 0
  device 0
}
ctl.!default {
  type hw
  card 0
}

rouvas

@gippy73 glad you've finally sort it out. Out of curiosity, what was the source of the ISO you used to install Debian? Was it the official one or did you roll your own?

gippy73

It was the official. Don't know exactly which release, because I installed on June, but surely it was the one available on Olimex's website at that time.

This is the /etc/asound.conf that came with it (from my backup before modifying):

pcm.dmixer {
      type dmix
      ipc_key 1024
      ipc_key_add_uid false
      ipc_perm 0660
      slave {
          pcm "hw:1,0"
          rate 48000
          channels 2
          period_time 0
          period_size 1024
          buffer_time 0
          buffer_size 4096
      }
  }

pcm.!default {
      type plug
      slave.pcm "dmixer"
  }

pcm.!hdmi-remap {
      type asym
      playback.pcm {
          type plug
          slave.pcm "remap-surround71"
      }
  }

pcm.!remap-surround71 {
      type route
      slave.pcm "hw:1,0"
      ttable {
          0.0= 1
          1.1= 1
          2.4= 1
          3.5= 1
          4.2= 1
          5.3= 1
          6.6= 1
          7.7= 1
      }
  }