You are not logged in.

#1 2013-09-02 14:48:01

rpt
Member
Registered: 2013-07-31
Posts: 14

Sound on Thinkpad x120e

Hello,
I have been attempting to get sound working for some time without success, using ALSA. (I hope this is the correct forum to post this issue)

[root@wldhcp-10-221-34-123 ~]# cat /etc/asound.conf 
#pcm.!default {
#    type hw
##    card 1
#}

#ctl.!default {
##    type hw
#    card 1
#}

# Use PulseAudio by default
pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

With respect to the above, I had tried also to comment out the bottom portion leaving only the currently commented out portion, with no success.

[root@wldhcp-10-221-34-123 ~]# ls -l /dev/snd
total 0
drwxr-xr-x  2 root root      100 Aug 26 09:29 by-path
crw-rw----+ 1 root audio 116,  5 Aug 26 09:29 controlC0
crw-rw----+ 1 root audio 116,  9 Aug 26 09:29 controlC1
crw-rw----+ 1 root audio 116,  2 Aug 26 09:29 controlC29
crw-rw----+ 1 root audio 116,  4 Aug 26 09:29 hwC0D0
crw-rw----+ 1 root audio 116,  8 Aug 26 09:29 hwC1D0
crw-rw----+ 1 root audio 116,  3 Aug 28 22:52 pcmC0D3p
crw-rw----+ 1 root audio 116,  7 Aug 28 22:52 pcmC1D0c
crw-rw----+ 1 root audio 116,  6 Aug 28 22:52 pcmC1D0p
crw-rw----  1 root audio 116,  1 Aug 26 09:29 seq
crw-rw----+ 1 root audio 116, 33 Aug 26 09:29 timer
[root@wldhcp-10-221-34-123 ~]# lsmod | grep '^snd' | column -t
snd_hda_codec_conexant  35994   1
snd_hda_codec_hdmi      29765   1
snd_hda_intel           35309   5
snd_hda_codec           147474  3   snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_hda_intel
snd_hwdep               6332    1   snd_hda_codec
snd_pcm                 77765   3   snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc          7234    2   snd_pcm,snd_hda_intel
snd_timer               18718   1   snd_pcm
snd                     58950   18  snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_pcm,snd_hda_codec,snd_hda_intel,thinkpad_acpi
[root@wldhcp-10-221-34-123 Zero 7 -- Another Late Night]# 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: SB [HDA ATI SB], device 0: CX20582 Analog [CX20582 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Playing with aplay seems to do something, as it doesn't return to the terminal after outputting the following, but with no sound:

[root@wldhcp-10-221-34-123 Zero 7 -- Another Late Night]# aplay 14\ cool\ out.mp3 
Playing raw data '14 cool out.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono

Additionally, KDE lists several outputs in order on its 'Multimedia -> Phonon':
'Default ALSA Output (currently PulseAudio sound server)'
'HDA ATI SB (CX20682 Analog)'
PulseAudio Sound Server'
'jack'
'pulse'
'Default'
'HD-Audio Generic (HDMI 0)'

And a few others, some of which are greyed out.
I presume I am making some silly error due to my lack of knowledge of these subsystems.. any advice appreciated! Of course I can also provide any additional info if I forgot anything.

Last edited by rpt (2013-09-02 20:27:17)

Offline

#2 2013-09-03 03:23:16

R81Z3
Member
Registered: 2013-09-03
Posts: 7

Re: Sound on Thinkpad x120e

What I would suggest is to make sure alsamixer see's  the correct device fire up alsamixer and check the defaults and make sure the audio is unmuted and it sees the correct device. Then continue to use aplay with the D option to select the correct device and you should have sound. The archwiki is also quite good if you follow all the steps.

https://wiki.archlinux.org/index.php/Ad … chitecture

Also just keep working on it in KDE as if you get aplay to use a device make sure it is at the top of the list and configured properly. You might not even need an asoundrc file as the defaults might be good enough.

R81Z3


R81Z3

Security +, Linux +, LPIC 1, still learning!

Offline

#3 2013-09-03 16:44:50

rpt
Member
Registered: 2013-07-31
Posts: 14

Re: Sound on Thinkpad x120e

Thanks for the reply. Three devices are available through alsamixer:

HD-Audio Generic
HDA ATI SB
ThinkPad Console Audio Control

The one I'm interested in, the HDA ATI SB, shows all the controls normally, and is unmuted. The other two show a single control as a little square with '00' volume and no way to change it -- I suspect they are just disabled or something.

In any case, the HDA ATI SB is currently at the top of KDE's device list. My backend is Phonon, if that makes any difference. (I'm still not 100% on how these subsystems all fit together)

With regards to the Wiki guide, I believe I have followed the steps there. I'll go over some of it here:

[root@wldhcp-10-221-34-123 php-5.5.3]# amixer sset Master unmute
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 36854 [56%] [on]
  Front Right: Playback 36854 [56%] [on]
[root@wldhcp-10-221-34-123 php-5.5.3]# alsactl init
Found hardware: "HDA-Intel" "ATI R6xx HDMI" "HDA:1002aa01,00aa0100,00100200" "0x1002" "0x1314"
Hardware is initialized using a generic method
[root@wldhcp-10-221-34-123 php-5.5.3]# cat /etc/modprobe.d/alsa-base.conf 
options snd slots=snd-hda-intel
options snd_hda_intel index=1

I'm not sure where to go from there, as most of the rest of the guide seems to be aimed towards more specialized setups.

Offline

#4 2013-09-03 21:26:25

rpt
Member
Registered: 2013-07-31
Posts: 14

Re: Sound on Thinkpad x120e

Curiously, aplay -l does not find any soundcards when I run it as non-superuser. As root it works fine. Perhaps there is an issue with permissions, then? aplay also returns 'Permission denied' from non-superusers.

I am having trouble using aplay -D -- what sort of value is supposed to come after D? I tried with card number, and filenames from /dev/snd.

Thanks

Offline

#5 2013-09-04 02:48:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Sound on Thinkpad x120e

Moving to Kernel and Hardware...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2013-09-04 15:58:29

jsoy9pQbYVNu5nfU
Member
Registered: 2013-04-19
Posts: 108

Re: Sound on Thinkpad x120e

rpt wrote:

I am having trouble using aplay -D -- what sort of value is supposed to come after D? I tried with card number, and filenames from /dev/snd.

Thanks

The -D option doesn't select hardware devices by name but PCMs, for example

aplay -D default

.

Regarding your actual problem:

Firstly, for ALSA audio playback, you definitely have to use your second card as shown by aplay -l:

card 1: SB [HDA ATI SB], device 0: CX20582 Analog [CX20582 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0

For what reasons did you comment the first few lines doing that in your /etc/asound.conf out?

In any case, you need something like

defaults.ctl.card 1
defaults.pcm.card 1
defaults.timer.card 1

in /etc/asound.conf. I have a Thinkpad x121e with the following cards:

**** 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: SB [HDA ATI SB], device 0: CX20590 Analog [CX20590 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

and I get playback using that. Try simple ALSA audio playback with these settings, like in mplayer -ao alsa:device=default <TUNE>. It should work if there are no permission problems involved. If it doesn't, we need to debug the permission problem. Save pulseaudio for the end as it is the most quirky thing in this thread.

Offline

#7 2013-09-04 17:30:18

rpt
Member
Registered: 2013-07-31
Posts: 14

Re: Sound on Thinkpad x120e

Thank you, the configuration you posted works! As you guessed, PulseAudio is not as cooperative. I've tried promoting to the highest priority to 'Default', 'HDA ATI SB', 'PulseAudio Sound Server', and 'pulse'. The sound system is using Phonon as a backend. What would you recommend for diagnosing this? Or is there a particular resource I should look at?

Offline

#8 2013-09-04 19:51:05

rpt
Member
Registered: 2013-07-31
Posts: 14

Re: Sound on Thinkpad x120e

For some reason I did not note before, that it does seem to be a permissions issue as you mentioned. Playing a file with mplayer works as root, but as non-root yields

==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
[AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '1'
[AO_ALSA] alsa-lib: conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
[AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings
[AO_ALSA] alsa-lib: conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
[AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name
[AO_ALSA] alsa-lib: conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
[AO_ALSA] alsa-lib: conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory
[AO_ALSA] alsa-lib: pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
[AO_ALSA] Playback open error: No such file or directory
Failed to initialize audio driver 'alsa:device=default'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video


Exiting... (End of file)

Offline

Board footer

Powered by FluxBB