# Sound card detected but no sound...and other issues [solved]

## mani001

Hi,

I just bought an HP Pavilion DM1Z...and it's giving me a lot of headaches, the sound card being only one of them  :Smile:  I think this should work since there are no people complaining about it (as opposed to the graphics card or the wireless card  :Sad:  ) The thing is the sound card seems to get recognized:

```

root@hp manu $dmesg |grep -i alsa -A 4

[    2.186764] ALSA device list:

[    2.188809]   #0: HD-Audio Generic at 0xf0244000 irq 42

[    2.190803]   #1: HDA ATI SB at 0xf0240000 irq 16

[    2.192842] Netfilter messages via NETLINK v0.30.

[    2.194929] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)

root@hp manu $

```

and

```

root@hp manu $lspci -v |grep -i audio -A 5

00:01.1 Audio device: ATI Technologies Inc Device 1314

        Subsystem: Hewlett-Packard Company Device 1611

        Flags: bus master, fast devsel, latency 0, IRQ 42

        Memory at f0244000 (32-bit, non-prefetchable) [size=16K]

        Capabilities: [50] Power Management version 3

        Capabilities: [58] Express Root Complex Integrated Endpoint, MSI 00

--

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)

        Subsystem: Hewlett-Packard Company Device 1611

        Flags: bus master, slow devsel, latency 64, IRQ 16

        Memory at f0240000 (64-bit, non-prefetchable) [size=16K]

        Capabilities: [50] Power Management version 2

        Kernel driver in use: HDA Intel

root@hp manu $

```

Also, in KDE I can see both sound cards (I assume one of the is due to the webcam).

However, when I try to play something, there is no sound and mplayer, for instance, gives the following error

```

[AO_ALSA] alsa-lib: pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave

[AO_ALSA] Error de apertura en la reproducción: No such file or directory

[AO SDL] Samplerate: 44100Hz Canales: Stereo Formato s16le

[AO_ALSA] alsa-lib: pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave

[AO SDL] Imposible abrir audio: No available audio device

DVB card number must be between 1 and 4

AO: [null] 44100Hz 2ch s16le (2 bytes per sample)

```

(some of the messages are in Spanish, I know, sorry   :Embarassed:   )

Another funny thing: in the kernel If I take out the HDMI support within HDA-Intel...then a panic occurs and the kernel won't boot   :Shocked: 

Any idea? Could it be that the wrong sound card (the webcam or the integrated USB microphone?) is being picked up? Should I mess around with /etc/modprobe.d/alsa.conf?Last edited by mani001 on Tue Jun 28, 2011 5:43 am; edited 1 time in total

----------

## aCOSwt

 *mani001 wrote:*   

> 
> 
> However, when I try to play something, there is no sound and mplayer, for instance, gives the following error
> 
> ```
> ...

 

Well, this could just mean that the pcm output you selected with mplayer does not exists.

Which is likely, as I presume that you tried with an empty .asoundrc-like file, and so get no dmix pcm declared.

What I would advise is that you start testing your sound under console with much simpler apps such as aplay.

Then either you configure your sound apps (kde-phonon's backend included) to output on an existing pcm (even the default one) you will have ensured it works under aplay, or you enter the club of .asoundrc language afficionados and fiddle an appropriate set of plugins including dmix.

----------

## mani001

Thank you aCOSwt, that was fast!!   :Very Happy: 

I got it working now...though not figured out   :Confused:   I poked around a little bit with aplay but I wasn't able to hear anything either (by the way, "aplay file.wav" is not enough and I should play with some other options for choosing the device and stuff, right ?) Anyway, now it's working...out of the blue   :Shocked:   ...but now I have a new problem: when I'm using amarok, I cannot watch youtube videos and viceversa. It seems that the device gets busy when a program first asks for it and then no one else can use it. Any ideas/thoughts on this?

PS: I don't dare to put solved here (not really helpful if someone finds this later...)

----------

## aCOSwt

 *mani001 wrote:*   

> when I'm using amarok, I cannot watch youtube videos and viceversa. It seems that the device gets busy when a program first asks for it and then no one else can use it. Any ideas/thoughts on this?

 

Right. This is now because you need, as an interface to your hardware devices :

- Either the dmix plugin I was writing about in my previous post.

- Or a sound server.

Make your choice depending on what you intend to do with your box as far as audio is concerned. (Consumer / Pro) Audio.

----------

## mani001

I really don't know how to either of those   :Embarassed:   Could you please give me some additional hint? The computer is a laptop and thus it's intended for consumer audio.

By the way, I was assuming that KDE had its own sound server (through phonon or something like that)...but it doesn't, does it?   :Confused: 

Also, I don't get why I have to mess with these things here since I never had to with other computers. In fact, in my desktop computer I don't even start the alsasound service and everything is working without a glitch.

----------

## aCOSwt

 *mani001 wrote:*   

> By the way, I was assuming that KDE had its own sound server (through phonon or something like that)...but it doesn't, does it?  

 

Well... at first, phonon is not exactly a sound server and... second... it acts for kde environment and some kde apps only and... things such as flash-player are... not kde apps !   :Twisted Evil: 

=> your kde phonon's backend will conflict with any non kde sound app anyway. 

 *mani001 wrote:*   

> Also, I don't get why I have to mess with these things here since I never had to with other computers. In fact, in my desktop computer I don't even start the alsasound service and everything is working without a glitch.

 

1/ Would you be using OSS rather than ALSA on these computers ? This could well explain why they do not need any alsa specific settings.

2/ Would these computer run pulseaudio which is actually a sound server ? Pulseaudio makes many things transparent to the user. Transparent and... heavy !   :Twisted Evil: 

=>

I have been to quick asking you for choosing between a mixer and a sound server. You need first to determine which sound API these computers are using and if they are running pulseaudio or not.

Then make your choice if you want to do the same or differently.

----------

## mani001

Hi again aCOSwt...and thank you very much for your time!!

I know Phonon is not a sound server (that's why I used "through"  :Wink:  ), but I thought KDE 4 had a sound server because KDE 3 used to (arts or something like that). But yes, you're right that all non kde apps would ignore it...in the best of cases :-S

On these computers (I'm writing from one of them now  :Smile:  ) I was/am not using OSS and/or pulseaudio. In this computer I don't even have any OSS option set in the kernel (not even the compatibility related ones   :Cool:   ). I don't know why in all those computer sound just worked out of the box but in this one I have to struggle (probably the integrated webcam/usb mic...)  I just want to make it easy since I don't need any fancy stuff like real-time audio, jack or whatever.

----------

## aCOSwt

could you post the output of :

```
# cat $HOME/.asoundrc and # cat /etc/asound.conf
```

On both of your "old" systems and your Pavilion.

And, while you are at it, the ouput of 

```
# aplay -L
```

----------

## mani001

Hi again,

first of all, I've got it figured out now!! Thank you very much for your guidance  :Very Happy: 

Yesterday, I was using as .asoundrc (working...but only one program can use the sound card at a given time)

```

pcm.!default {

type hw

card 1

}

ctl.!default {

type hw

card 1

}

```

Today I added

```

pcm.!default {

   type plug

   slave.pcm "dmixer"

}

pcm.dmixer  {

    type dmix

    ipc_key 1024

    slave {

      pcm "hw:1,0"

      period_time 0

      period_size 1024

      buffer_size 4096

      rate 44100

   }

   bindings {

      0 0

      1 1

   }

}

ctl.dmixer {

   type hw

   card 0

}

```

and put "default" at the top of phonon's preferred devices...and that did the trick. I took this code (I don't really know a thing about dmix) from http://www.alsa-project.org/main/index.php/Asoundrc.

Just in case it help someone else in the future...my list of devices is:

```

manu@hp manu $aplay -l; arecord -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: STAC92xx Analog [STAC92xx Analog]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

**** List of CAPTURE Hardware Devices ****

card 1: SB [HDA ATI SB], device 0: STAC92xx Analog [STAC92xx Analog]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

```

It seems (only a hypothesis) that without .asoundrc or asoundconf the programs were picking the wrong device.

About my other comptuers (2)...none of them has neither .asoundrc nor asoundconf and the sound works perfectly well (maybe these are only needed in twisted setups).

I can now put solved   :Very Happy:   thank you very much!!

----------

## dbeavers

Thanks!!  I have been spending numerous hours trying to fix this.  The break through was to try

```
aplay -D hw:1,0 test.wav
```

That finally got some sound out of my mute computer!!!

----------

