Default sound problems with xfce4 & alsa.

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Wehi

Default sound problems with xfce4 & alsa.

Post by Wehi »

Greetings All,

I'm running Mint17 with xfce for a media centre PC. Overall I'm very pleased with the setup, its snappy & fast but I have one big problem:

I can't get default sound working. The window manager and any applications that depend on it (ie. Spotify, Videos app etc) simply have no sound at all. I know the hardware and alsa are working as XBMC & VLC both work fine if I specify a pass through and choose the optical port. However for any applicaiton where I can't specify the device to use I hear nothing.

This in the past was working, but an update in the last week or two seems to have broken it.

I'm not able to use Pulse Audio as sound vi Pulse Audio is constantly out of sync on this machine.

I've asked Mr. Google about this and his suggestion was to craft up an .asoundrc, which I've done. However it does not appear to have helped. The file I'm using is below (I've also tried with the actual hardware numbers).

Any tips or hints on where to look next would be much appreciated!

My .asoundrc:

pcm.!default {
type hw
card PCH
device 1
}

ctl.!default {
type hw
card PCH
device 1
}

Output from aplay -L:

null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=PCH
HDA Intel PCH, ALC898 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
Front speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=PCH,DEV=0
HDA Intel PCH, HDMI 0
HDMI Audio Output
hdmi:CARD=PCH,DEV=1
HDA Intel PCH, HDMI 1
HDMI Audio Output
dmix:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
Direct sample mixing device
dmix:CARD=PCH,DEV=1
HDA Intel PCH, ALC898 Digital
Direct sample mixing device
dmix:CARD=PCH,DEV=3
HDA Intel PCH, HDMI 0
Direct sample mixing device
dmix:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
HDA Intel PCH, ALC898 Digital
Direct sample snooping device
dsnoop:CARD=PCH,DEV=3
HDA Intel PCH, HDMI 0
Direct sample snooping device
dsnoop:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Direct sample snooping device
hw:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
HDA Intel PCH, ALC898 Digital
Direct hardware device without any conversions
hw:CARD=PCH,DEV=3
HDA Intel PCH, HDMI 0
Direct hardware device without any conversions
hw:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
HDA Intel PCH, ALC898 Analog
Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
HDA Intel PCH, ALC898 Digital
Hardware device with all software conversions
plughw:CARD=PCH,DEV=3
HDA Intel PCH, HDMI 0
Hardware device with all software conversions
plughw:CARD=PCH,DEV=7
HDA Intel PCH, HDMI 1
Hardware device with all software conversions

inxi -Fxz output:

System: Host: mediabox Kernel: 3.13.0-24-generic x86_64 (64 bit, gcc: 4.8.2)
Desktop: Xfce 4.11.6 (Gtk 2.24.23) Distro: Linux Mint 17 Qiana
Machine: Mobo: Intel model: DH77DF version: AAG40293-300
Bios: Intel version: KCH7710H.86A.0103.2012.1029.1732 date: 10/29/2012
CPU: Dual core Intel Core i3-2120T CPU (-HT-MCP-) cache: 3072 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 10376.1
Clock Speeds: 1: 1600.00 MHz 2: 1600.00 MHz 3: 1600.00 MHz 4: 1600.00 MHz
Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller bus-ID: 00:02.0
X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1080@60.0hz
GLX Renderer: Mesa DRI Intel Sandybridge Desktop GLX Version: 3.0 Mesa 10.1.3 Direct Rendering: Yes
Audio: Card: Intel 7 Series/C210 Series Chipset Family High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture ver: k3.13.0-24-generic
Network: Card: Intel 82579V Gigabit Network Connection driver: e1000e ver: 2.3.2-k port: f080 bus-ID: 00:19.0
IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives: HDD Total Size: 9249.9GB (76.0% used) 1: id: /dev/sda model: WDC_WD1200BEVE size: 120.0GB
2: id: /dev/sdb model: SAMSUNG_HD203WI size: 2000.4GB 3: id: /dev/sdc model: SAMSUNG_HD203WI size: 2000.4GB
4: id: /dev/sdd model: WDC_WD20EARS size: 2000.4GB 5: id: /dev/sde model: WDC_WD30EZRX size: 3000.6GB
6: id: /dev/sdf model: M4 size: 128.0GB
Partition: ID: / size: 110G used: 14G (13%) fs: ext4
RAID: No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors: System Temperatures: cpu: 29.8C mobo: 27.8C
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 191 Uptime: 2:40 Memory: 1781.6/15942.1MB Runlevel: 2 Gcc sys: 4.8.2 Client: Shell inxi: 1.8.4
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Wehi

Re: Default sound problems with xfce4 & alsa.

Post by Wehi »

A quick update, I've played with this some more and I can get default sound working through the hdmi port but still not via the optical out.

If I change the .asoundrc file to this then I can hear spotify etc via hdmi on the telly :

pcm.!default {
type hw
card PCH
device 7
}

ctl.!default {
type hw
card PCH
device 7
}

However if I use this (which I believe corresponds to the spdif port) then I get nothing:

pcm.!default {
type hw
card PCH
device 1
}

ctl.!default {
type hw
card PCH
device 1
}

Interestingly speaker-test works for device 7, but not for device 1 also - for example:

This gives me sound via the telly:

speaker-test -Dhw:0,7 -c 2 -wav

This gives me nothing:

speaker-test -Dhw:0,1 -c 2 -wav

This gives me sound via the receiver on the optical out (which is what I want):

speaker-test -Diec958:0,0 -c 2 -wav

Using iec958 in the .asoundrc file though throws an error:

ALSA lib pcm_iec958.c:601:(_snd_pcm_iec958_open) Unknown field card
Playback open error: -22,Invalid argument

So that isn't the solution.

It looks to me like the optical port simply isn't available on hw0,1 which leads me to believe this might be an ALSA config issue rather than a XFCE problem. =/
Wehi

Re: Default sound problems with xfce4 & alsa.

Post by Wehi »

Okay I've found an interim work around here:

http://www.larsen-b.com/Article/425.html

Replacing usb in the code with iec958 did the trick and I can now route sound in spotify etc via optical out to the amplifier.

Not a very elegant solution but it will do for now - hopefully whatever update broke this will fix it in a future patch.
Locked

Return to “Xfce”