LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Debian - no sound with HDMI cable (https://www.linuxquestions.org/questions/debian-26/debian-no-sound-with-hdmi-cable-4175493058/)

Xeratul 01-29-2014 09:01 PM

Debian - no sound with HDMI cable
 
Hello,

I've installed a dual boot : windows and debian on a new multimedia pc.

On Windows, I can get the sound from the tv passed by the HDMI cable. Windows works fine as usual.

However, I connected my laptop up (running squeeze) to my Samsung TV and though the picture comes up fine the sound only plays via the laptop.


My cat /proc/asound/cards tells us:
Code:

0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfcef8000 irq 42
 1 [NVidia        ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfebfc000 irq 17
 2 [U0x46d0x821    ]: USB-Audio - USB Device 0x46d:0x821
                      USB Device 0x46d:0x821 at usb-0000:00:1d.7-4, high speed

Code:

uname  -a
Linux multimedia 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 i686 GNU/Linux


$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


mplayer alitech.avi -ao alsa:device=hw=1,9

...


==========================================================================
[AO_ALSA] alsa-lib: pcm_hw.c:1293:(snd_pcm_hw_open) open '/dev/snd/pcmC1D0p' failed (-2): No such file or directory
[AO_ALSA] Playback open error: No such file or directory
Failed to initialize audio driver 'alsa:device=hw=1'
No such audio driver '9'
Could not open/initialize audio device -> no sound.
Audio: no sound
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 640x272 => 640x272 Planar YV12
V:1390.6 33342/33342  2%  3%  0.0% 0 0

Exiting... (Quit)

Since using Windows (which I'd prefer not to!) both picture and sound works fine, so I assume it is some Debian related issue.

Any suggestions where I should look? Settings? Missing packages?

Thank you in advance

k3lt01 01-29-2014 09:08 PM

I had a similar issue a while back when Wheezy was first introduced and again when I started using MATE almost exclusively. I found that ALSA was my problem and by installing PulseAudio (with its associated requirements for different DEs) the problem went away because I could select HDMI and know it would work as it should.

Xeratul 01-29-2014 09:23 PM

Quote:

Originally Posted by k3lt01 (Post 5107805)
I had a similar issue a while back when Wheezy was first introduced and again when I started using MATE almost exclusively. I found that ALSA was my problem and by installing PulseAudio (with its associated requirements for different DEs) the problem went away because I could select HDMI and know it would work as it should.

PulseAudio was not the solution to your problem. You probably dont know how to use alsa ;)


Got it ...

I had to make "1,9" changed to "1.9"
It works now, and I reconfigured alsa to start hdmi as card 0.

k3lt01 01-29-2014 09:31 PM

Quote:

Originally Posted by Xeratul (Post 5107811)
PulseAudio was not the solution to your problem. You probably dont know how to use alsa ;)

Probably Alsa was just useless and Pulse did the job first time. I posted a thread somewhere, maybe not in LQ, and got no answers at all. I remembered Ubuntu moved to Pulse, and got totally bagged for it to, so I gave Pulse ago and it worked where Alsa, no matter what I did with settings, wouldn't.

Glad you got Alsa working though with some fiddling. Don't forget to mark the thread as solved.

replica9000 01-30-2014 10:24 AM

I had to create a file called '.asoundrc' under my home directory to get sound over HDMI.

Code:

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

EDIT: Using kernel 3.2.0 with an nVidia GTS450

Shadowmeph 01-30-2014 11:27 AM

or my self with ATI card and HDMI I had problems I couldn't see the HDMI in the hardware sound when tryin opensuse I tried several thing and ended up breaking it so I installed mint and still couldn't find any HDMI settings at all in the hardware\sound so I intall the ATI fglrx drivers rebooted and looked and found the HDMI there then just used that.
Now I am not sure if this will work for you but you could try if all else fails.

vl23 01-31-2014 10:07 AM

Quote:

Originally Posted by Shadowmeph (Post 5108145)
or my self with ATI card and HDMI I had problems I couldn't see the HDMI in the hardware sound when tryin opensuse I tried several thing and ended up breaking it so I installed mint and still couldn't find any HDMI settings at all in the hardware\sound so I intall the ATI fglrx drivers rebooted and looked and found the HDMI there then just used that.
Now I am not sure if this will work for you but you could try if all else fails.

I had a similar problem on Wheezy, with an ATI card, for whatever reason it showed my HDMI sound card as unclaimed, IIRC I read that they'd blocked that functionality because of some issues with the ATI open source drivers.

Archy1 02-04-2014 06:48 PM

I had the exact same problem except the other way around (could only get sound with HDMI) (see thread) and here's how I fixed it:

I placed the following code in '~/.asoundrc'
Code:

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


Paul! 02-05-2014 09:56 AM

What is your processor? With a standard stable install I didn't have the module for HDMI audio on an Intel i series. Jessie worked perfectly. Of course an kernel update would have worked as well, but this was a new install so I just couldnt be bothered.

ericg1234 10-11-2015 10:44 PM

Redirecting audio to HDMI in Debian
 
Installing pavucontrol did the trick for me. Try the following:

* install with "sudo apt-get install pavucontrol"
* start a video in browser and redirect video to TV
* invoke pavucontrol using "alt+F2 pavucontrol"
* click Playback tab
* set "Playback on" to Built-in Audio Digital Stereo (HDMI)

HTH,

Eric


All times are GMT -5. The time now is 03:00 AM.