You are not logged in.

#1 2013-11-10 03:25:41

helmut
Member
Registered: 2008-10-10
Posts: 65

[SOLVED] soundcard does not work with aplay, arecord, linphone ...

I have installed Archlinux freshly on a laptop. I cannot get any sound from my soundcard.

speaker-test

speaker-test 1.0.27.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory

speaker-test -c 2 -D plughw:1

Playback device is plughw:1
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right

The last command runs successfully, but no physical sound.

Some diagnostics:

lspci |grep Audio

00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Wrestler HDMI Audio [Radeon HD 6250/6310]
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01)

lsmod | grep snd

snd_hda_codec_realtek    32335  1 
snd_hda_codec_hdmi     27025  1 
snd_hda_intel          30903  0 
snd_hda_codec         127562  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
snd_hwdep               4746  1 snd_hda_codec
snd_pcm                63876  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc          5942  2 snd_pcm,snd_hda_intel
snd_timer              14942  1 snd_pcm
snd                    44566  7 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec,snd_hda_intel
soundcore               4386  1 snd

aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
bash alsa-info.sh --upload

http://www.alsa-project.org/db/?f=8f2ec … 6ab9c52f6a


Any idea on how to get the soundcard working?

Last edited by helmut (2013-11-12 22:04:49)

Offline

#2 2013-11-10 05:00:14

pigiron
Member
From: USA
Registered: 2009-07-14
Posts: 150

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

I stopped when I found this:

Node 0x03 [Audio Output] wcaps 0x1d: Stereo Amp-Out
  Control: name="Speaker Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=8, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM

Try "alsamixer -c 1" and turn up the volume... then check the rest of the settings.

Offline

#3 2013-11-10 14:50:17

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

pigiron wrote:

Try "alsamixer -c 1" and turn up the volume... then check the rest of the settings.

I think your system is using hdmi (card0) as default. You can default to analog on alsa with this .asoundrc:

pcm.!default { 
type hw 
card 1 
} 

ctl.!default { 
type hw 
card 1 
}

then make sure your card is not muted with alsamixer -c 1, as stated above :)

Offline

#4 2013-11-10 23:53:20

helmut
Member
Registered: 2008-10-10
Posts: 65

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

Thanks, that solved the problem that no sound appears. Now all tests with "speaker-test" work find and I can watch (and listen to) videos in the browser.

However working directly with the alsa tools is not yet possible completely. E.g.

$ aplay -c 2 /usr/share/sounds/alsa/Front_Left.wav

Playing WAVE '/usr/share/sounds/alsa/Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1239: Channels count non available

The same message appears regardless whether I specify a channel count or not.

This is strange since many other applications which work with the sound card work properly (e.g. skype, vlc, browser, ...).

Any idea why the alsa tools run into errors?

Offline

#5 2013-11-11 07:46:13

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

/usr/share/sounds/alsa/Front_Left.wav should be mono, so it has only one channel.
I bet if you tried it with stereo wav file it would work without errors.

EDIT: nope I just tried the same file with same command and I'm not getting that error.
Do you get any audio at all when you play that file?

Last edited by ooo (2013-11-11 07:49:23)

Offline

#6 2013-11-11 19:45:05

helmut
Member
Registered: 2008-10-10
Posts: 65

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

No, using just one channel does not change anything.

If I play the wav-files with another application (e.g. vlc) the sound works well. Just the alsa tools like aplay and arecord abort immediately with the above written errormessage.

Offline

#7 2013-11-11 23:35:04

helmut
Member
Registered: 2008-10-10
Posts: 65

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

It is not just the alsa tools like aplay and arecord which do not work with the soundcard. The sipphones linphone and ekiga cannot use the soundcard either.

Here some diagnostic output from linphone

...
message: Registering all soundcard handlers
message: Card 'ALSA: default device' added
warning: Could not attach mixer to card: Invalid argument
warning: Strange, sound card HD-Audio Generic does not seems to be capable of anything, retrying with plughw...
warning: Strange, sound card HD-Audio Generic seems totally unusable.
message: Card 'ALSA: HD-Audio Generic' added
warning: Could not attach mixer to card: Invalid argument
warning: Strange, sound card HD-Audio Generic does not seems to be capable of anything, retrying with plughw...
message: Card 'ALSA: HD-Audio Generic' added
message: Card 'PulseAudio: default' added
...

Any hint or more diagnostics needed?

Offline

#8 2013-11-12 10:07:56

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

I'm thinking the card in ctl!default might be wrong since it cannot attach the mixer.

does alsamixer -c 1 work?

are you using pulseaudio or some other sound server?

Offline

#9 2013-11-12 10:25:06

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

That .asoundrc is very incomplete, it doesn't set up any plugins that are needed for proper functioning of today's sound chips. Try this instead: https://bbs.archlinux.org/viewtopic.php … 3#p1344743

Offline

#10 2013-11-12 15:48:01

helmut
Member
Registered: 2008-10-10
Posts: 65

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

@ooo: "alsamixer -c 1" works fine. "amixer -c 1" as well.
@gusar: The link you gave doen't say anything about settings in .asoundrc.


Here the output of amixer:

$ amixer -c 1
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 86 [99%] [-0.75dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [12.00dB] [on]
  Front Right: Playback 31 [100%] [12.00dB] [on]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Beep',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 25 [81%] [3.00dB] [off]
  Front Right: Playback 25 [81%] [3.00dB] [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 31 [100%] [30.00dB] [on]
  Front Right: Capture 31 [100%] [30.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Internal Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [12.00dB] [off]
  Front Right: Playback 31 [100%] [12.00dB] [off]
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 3 [100%] [36.00dB]
  Front Right: 3 [100%] [36.00dB]

I cannot play anything with aplay

$ aplay -c 2 /usr/share/sounds/alsa/Front_Center.wav
aplay: set_params:1239: Channels count non available

The same errormessage with arecord.

If I put an external headphone and microphon, I can hear my own voice in the headphone. Unfortunately programs like linphone and Ekiga do not get anything neither from my mic nor anything from the other side of the line. So I can set up calls, the bell rings if there is an incoming call, but I cannot communicate with the other side.

The strange thing: skype works perfectly, with the internal mic and speaker and with external mic and headphone. So there must be something wrong in the way programs like linphone and Ekiga access the sound card (see the error output from linphon above).

Last edited by helmut (2013-11-12 15:54:16)

Offline

#11 2013-11-12 15:53:11

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

helmut wrote:

@gusar: The link you gave doen't say anything about settings in .asoundrc.

Yeah, that's the point. Like I said, do what's in that thread *instead* of playing with .asoundrc.

Offline

#12 2013-11-12 16:35:42

helmut
Member
Registered: 2008-10-10
Posts: 65

Re: [SOLVED] soundcard does not work with aplay, arecord, linphone ...

@gusar: Thanks, setting the kernel module parameters as suggested solved the problem.

Since card 0 is now the analogue card, I just had to remove the .asoundrc file afterwards.

Last edited by helmut (2013-11-12 22:03:57)

Offline

Board footer

Powered by FluxBB