# No sound card with nVidia/HDMI [WORKING]

## depontius

I put the new GT 610 in tonight, and MythTV drives the video beautifully.  But there's no sound.

I start looking at the debug instructions, and I'm not even to square-1:

```
 ~ # lspci -s 02:00.1 -v -v -v -v

02:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)

        Subsystem: ASUSTeK Computer Inc. Device 83fb

        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-

        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

        Latency: 0, Cache Line Size: 64 bytes

        Interrupt: pin B routed to IRQ 11

        Region 0: Memory at def7c000 (32-bit, non-prefetchable) [size=16K]

        Capabilities: [60] Power Management version 3

                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)

                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-

        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+

                Address: 0000000000000000  Data: 0000

        Capabilities: [78] Express (v2) Endpoint, MSI 00

                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 <64us

                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-

                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-

                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+

                        MaxPayload 128 bytes, MaxReadReq 512 bytes

                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-

                LnkCap: Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Latency L0 <1us, L1 <4us

                        ClockPM+ Surprise- LLActRep- BwNot-

                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+

                        ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-

                LnkSta: Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

                DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF Not Supported

                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled

                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-

                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-

        Kernel modules: snd-hda-intel

 ~ # cat /proc/asound/cards 

--- no soundcards ---
```

The lscpi results look good - it's the fact that it says I have no soundcards that's the problem.  I can't even get to the rest of the debug instructions, because alsa can't find the soundcard.  I try running "alsaconf" manually and it finds nothing on the pci bus.

This is on a system running gentoo-sources-3.6.11, fully updated today.  I have every snd-hda-codec available built - including the hdmi that I should need, and the realtek that I might need.  I'm looking at nVidia's debug instructions, and prior to modprobing snd-hda-codec-hdmi there isn't even /proc/asound - afterword I get the line above.  It doesn't matter if I also load the realtek codec.

If I manually run alsaconf it can't detect any cards.  Again, on a fully-updated system none of the alsa stuff can see the sound on my video card - only lspci appears to.

EDIT - X is running, though I didn't mention that before.

----------

## 666threesixes666

can you get sound out of your sound card to pc speakers?  do you have a audio cable to your spdif headers on your sound card / motherboard...  did you set your sound to digital after your analog pc speaker test?

i also get no supported pnp or pci card found, yet have sound....

strange my cat /proc/asound/cards returns.....

 0 [NVidia         ]: HDA-Intel - HDA NVidia

                      HDA NVidia at 0xf7e78000 irq 21Last edited by 666threesixes666 on Sun Feb 03, 2013 3:15 am; edited 1 time in total

----------

## Jaglover

I'd boot with some good (multimedia?) liveCD and look at lspci -nnk output.

----------

## depontius

This is a video card with sound on it - specifically for HDMI out.  There is no other way to get sound out of it other than over HDMI.

I can give the multimedia LiveCD a try, can you recommend one?

What does the "-nn" do on lspci?  I've already verified that the "-k" tells me snd-hda-intel.  (without mentioning the codec)

----------

## depontius

I have more life out of the card.  On first boot I had apparent life, but no sound.  Then I rebuilt the kernel, hopefully specifically for it, and lost all recognition.  Unfortunately I'd not saved the kernel config I used on the first boot, so I went back to the previous boot and started there.

The previous boot was also 3.6.11, but I'd lost my remote control because the LIRC options had moved around.  But at least I had this config saved.  I started here and added only the LIRC stuff, leaving everything else unchanged.  I now detect the card correctly in ALSA.  Still no sound, but still a step forward.

I also did a diff between this configuration and the one with no card detected.  I dropped a bunch of unused LM_SENSORS stuff, and tweaked the sound options.  Here is the sound section:

```
< # CONFIG_SND_HRTIMER is not set

---

> CONFIG_SND_HRTIMER=m

> CONFIG_SND_SEQ_HRTIMER_DEFAULT=y

1954d1954

< CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y

1974c1974

< # CONFIG_SND_ALOOP is not set

---

> CONFIG_SND_ALOOP=m

2032,2034c2032,2034

< # CONFIG_SND_HDA_CODEC_ANALOG is not set

< # CONFIG_SND_HDA_CODEC_SIGMATEL is not set

< # CONFIG_SND_HDA_CODEC_VIA is not set

---

> CONFIG_SND_HDA_CODEC_ANALOG=y

> CONFIG_SND_HDA_CODEC_SIGMATEL=y

> CONFIG_SND_HDA_CODEC_VIA=y

2037c2037

< # CONFIG_SND_HDA_CODEC_CONEXANT is not set

---

> CONFIG_SND_HDA_CODEC_CONEXANT=y

2040,2041c2040,2041

< # CONFIG_SND_HDA_CODEC_CMEDIA is not set

< # CONFIG_SND_HDA_CODEC_SI3054 is not set

---

> CONFIG_SND_HDA_CODEC_CMEDIA=y

> CONFIG_SND_HDA_CODEC_SI3054=y
```

Basically on my bad attempt of last night, I built all of the hda codecs, fiddled with the HRTIMER stuff, and added SND_ALOOP.  I'm effectively bisecting now, building another kernel with my LM_SENSORS changes and none of the sound changes.  Assuming it isn't some bizarre interaction with LM_SENSORS then this boot will at least detect the card.  I may well do another iteration or two, trying to focus in a bit better.  I'll probably also do some searches on nVidia and SND_HRTIMER interactions.

But at any rate, if I can detect the sound stuff, I can start using the normal debug instructions, at least.

For that

----------

## Jaglover

Mythbuntu or similar might give you clues how to set it up (if it works of course). I had to take down my MythTV frontend with HDMI sound in hurry because my wife's nettop died and she is a Facebook addict, I remember I had to fiddle with ALSA setup to make it use HDMI as default output. But right now that hard drive with that setup is on the shelf.

----------

## depontius

I fiddled with kernel builds today, and have a working kernel.  I get the correct listings out of aplay and the right stuff in /proc/asound.  This evening I managed to get noise out through the TV using "speaker-test -Dhdmi:NVidia_1,1 -c 2".

Now I have no idea whatsoever how to take that speaker-test information and turn it into a working alsa configuration.  My problem is that alsa seems to pick the first of everything by default, and not only do I have to go to the second card, I have to go to the second whatever-it-is on that second card.  There has been mention of "probe_mask" in many places, especially including nVidia's document.  But it states that probe_mask is for use when there are multiple codecs, which is not the case for the GT 610.  I believe I have /etc/modprobe.d/also set up to simply load 2 cards with snd-hda-intel - the onboard sound, which is unused, and the sound on the GT 610.

I also started thinking I might have something for /etc/asoundrc, but when I started to write something, I realize that they're back to names like hw:1,1 or plughw:1,1 when I've only gotten things to work with hdmi:NVidia_1,1, and when I tried hw:1,1 I got something like "file not found."

I've found how people have fixed their own setups, but none of them are enough like mine to use their solutions, and all of those solutions are presented as "magic strings".  In essence I have no idea why that particular string worked in that setting, nothing is defined, and not guide how to apply it to my situation.  The nVidia documentation is interesting and thorough, but does nothing to map hardware into a working /etc/asoundrc.

----------

## Jaglover

I found some notes, try this

```
aplay --list-devices | grep -i HDMI
```

Here is what I got:

```
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
```

So I created following /etc/asound.conf

```
pcm.!default { 

    type hw 

    card 0 

    device 3 

} 

ctl.!default { 

    type hw 

    card 0 

    device 3 

} 
```

----------

## depontius

I eventually did find part of your solution.  I searched the nVidia documentation and found the line:

```
pcm.!default hdmi:CARD=NVidia_1,DEV=1
```

Upon booting with this, I got errors about syntax.  So a little more googling and I got something that works, looking more like this:

```
pcm.!default {

    hdmi:CARD=NVidia_1,DEV=1

    }
```

(I can't reach that system at the moment, so I can't post exactly what I've got.)

I don't have your second control device, and this morning I noticed that the "Mute" button on my remote control doesn't.  I suspect that adding something like your second stanza will help me.  I'll give that a shot tonight or tomorrow, thanks.

On the kernel side, I did a sort of "bisection", working with kernel configs instead of patches.  It seemed to be focused on using the RTC vs HR Timer for the sequencer.  I finally had a kernel with both built as modules, but using the RTC, with my hda hardware being properly detected.  I though that switching to the HRT would be a "bridge too far", and built that kernel just to make sure it failed.  It didn't - it works, too.  So that theory is blown, and now I don't know why I failed to have sound with that first kernel "configured for the new card."  I'm now down to this :

```
$ diff 20130202-3611.config-noSound 20130203-3611.config-bisect5 

1964c1964

< CONFIG_SND_OPL3_LIB_SEQ=m

---

> # CONFIG_SND_OPL3_LIB_SEQ is not set

1969,1970d1968

< CONFIG_SND_OPL3_LIB=m

< CONFIG_SND_AC97_CODEC=m

1979,1980d1976

< CONFIG_SND_AC97_POWER_SAVE=y

< CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0

2032,2034c2028,2030

< CONFIG_SND_HDA_CODEC_ANALOG=y

< CONFIG_SND_HDA_CODEC_SIGMATEL=y

< CONFIG_SND_HDA_CODEC_VIA=y

---

> # CONFIG_SND_HDA_CODEC_ANALOG is not set

> # CONFIG_SND_HDA_CODEC_SIGMATEL is not set

> # CONFIG_SND_HDA_CODEC_VIA is not set

2036,2041c2032,2037

< CONFIG_SND_HDA_CODEC_CIRRUS=y

< CONFIG_SND_HDA_CODEC_CONEXANT=y

< CONFIG_SND_HDA_CODEC_CA0110=y

< CONFIG_SND_HDA_CODEC_CA0132=y

< CONFIG_SND_HDA_CODEC_CMEDIA=y

< CONFIG_SND_HDA_CODEC_SI3054=y

---

> # CONFIG_SND_HDA_CODEC_CIRRUS is not set

> # CONFIG_SND_HDA_CODEC_CONEXANT is not set

> # CONFIG_SND_HDA_CODEC_CA0110 is not set

> # CONFIG_SND_HDA_CODEC_CA0132 is not set

> # CONFIG_SND_HDA_CODEC_CMEDIA is not set

> # CONFIG_SND_HDA_CODEC_SI3054 is not set

2049c2045

< CONFIG_SND_INTEL8X0=m

---

> # CONFIG_SND_INTEL8X0 is not set

2068c2064

< CONFIG_SND_YMFPCI=m

---

> # CONFIG_SND_YMFPCI is not set

2078d2073

< CONFIG_AC97_BUS=m
```

But to be perfectly honest, I'm working with "-bisect5", I'm happy with the config.  I'm done, but I'm marking this [WORKING] instead of [SOLVED] because there's so much black magic here, and I'd like to understand better.

----------

## 666threesixes666

```
mkultra@mksrv [ ~ ]$ cat /etc/asound.conf 

pcm.!default { type hw card MobilePre }

ctl.!default { type hw card MobilePre }

pcm.pulse {

    type pulse

}

ctl.pulse {

    type pulse

}

pcm.!default {

    type pulse

}

ctl.!default {

    type pulse

}

```

try

```

pcm.!default {

    hdmi:CARD=NVidia_1,DEV=1

    }

ctl.!default {

    hdmi:CARD=NVidia_1,DEV=1

    }

```

(mobile pre is an external sound card with guitar jacks and phantom powered xlr microphones for me, seems like u gotta have the ctl sections also)

----------

## depontius

I just added the ctl!default to /etc/asound.conf, and now have this:

```
pcm.!default {

type plug

slave.pcm "hdmi:CARD=NVidia_1,DEV=1"

}

ctl.!default {

type plug

slave.pcm "hdmi:CARD=NVidia_1,DEV=1"

}
```

Looking at what people have shown me here, it almost seems that I should have:

```
pcm.!default {

hdmi:CARD=NVidia_1,DEV=1

}

ctl.!default {

hdmi:CARD=NVidia_1,DEV=1

}
```

I may try it, but right now what I have is working.  (OK, I haven't tested the ctl part, yet.)  Can someone comment on the differences between these two configurations?

EDIT...

A little trial and error later, and adding the ctl stanza to what I had been running doesn't add any control.  The volume slider and mute indicator both appear on the screen, but there is no effect on the sound.  Trying the second method, without the plug statements, yields no sound.  I suppose I should be reading the documentation on asound.conf - I've come across it during my searches, but I suspect this is as much a problem with how it relates to my hardware, and the solution may not be obvious.  One little factiod...  When I bring up alsamixer and switch to the second card - the one I'm using, there are not sliders, only mutes.  (And I'm guessing at the moment that MythTV mutes by adjusting the volume, not by hitting the mute function on the card.)

----------

