ALSA HDMI Audio does not work

Asked by Libin Yang on 2008-02-27

We tested HDMI Audio on SB700+RS780 on linux-ubuntu-modules-2.6.24_2.6.24-10.14 and found it does not work.

This is a known issue for ALSA and it has been fixed in ALSA hg tree.

Here is the workaround patch for HDMI audio:

--- alsa-kernel/pci/hda/hda_intel.c.orig 2008-02-27 08:54:45.000000000 -0500
+++ alsa-kernel/pci/hda/hda_intel.c 2008-02-27 08:46:05.000000000 -0500
@@ -1812,15 +1812,15 @@
  gcap = azx_readw(chip, GCAP);
  snd_printdd("chipset global capabilities = 0x%x\n", gcap);

- if (gcap) {
- /* read number of streams from GCAP register instead of using
- * hardcoded value
- */
- chip->playback_streams = (gcap & (0xF << 12)) >> 12;
- chip->capture_streams = (gcap & (0xF << 8)) >> 8;
- chip->playback_index_offset = (gcap & (0xF << 12)) >> 12;
- chip->capture_index_offset = 0;
- } else {
+ //if (gcap) {
+ // /* read number of streams from GCAP register instead of using
+ // * hardcoded value
+ // */
+ // chip->playback_streams = (gcap & (0xF << 12)) >> 12;
+ // chip->capture_streams = (gcap & (0xF << 8)) >> 8;
+ // chip->playback_index_offset = (gcap & (0xF << 12)) >> 12;
+ // chip->capture_index_offset = 0;
+ //} else {
   /* gcap didn't give any info, switching to old method */

   switch (chip->driver_type) {
@@ -1843,7 +1843,7 @@
    chip->capture_index_offset = ICH6_CAPTURE_INDEX;
    break;
   }
- }
+ //}
  chip->num_streams = chip->playback_streams + chip->capture_streams;
  chip->azx_dev = kcalloc(chip->num_streams, sizeof(*chip->azx_dev),
     GFP_KERNEL);

Question information

Language:
English Edit question
Status:
Needs information
For:
Ubuntu linux-ubuntu-modules-2.6.24 Edit question
Assignee:
No assignee Edit question
Last query:
2008-02-27
Last reply:
2014-04-19

This question was originally filed as bug #196026.

Libin Yang (libin-yang) said : #1

Please forget the workaround patch I submitted. I have found the official patch in alsa hg tree.

Please kindly find the patch in http://git.kernel.org/?p=linux/kernel/git/perex/alsa.git;a=commitdiff;h=b5d85a782c87bcc92c9c20273757bcd02f692d9c;hp=1cc699e28ceeac996a8a8371c98bf22c29dd399c

Launchpad Janitor (janitor) said : #3

This bug was fixed in the package linux-ubuntu-modules-2.6.24 - 2.6.24-11.15

---------------
linux-ubuntu-modules-2.6.24 (2.6.24-11.15) hardy; urgency=low

  [Tim Gardner]

  * Fix ATI HDMI oops
    - LP: #196026
  * ifdef and net_ratelimit() iwlwifi debug messages
    - LP: #190475
  * SAUCE: Implemented suspend quirk support for HP NC6220 and NW8240
    - LP: #151111
  * Removed ivtv driver
    - LP: #197089

 -- Tim Gardner <email address hidden> Thu, 28 Feb 2008 13:53:20 -0700

JoePub (joepubber) said : #4

Still have same problem after upgrade to linux-ubuntu-modules 2.6.24-15.20. I had already tried the Realtek drivers for the ALC889A from their website, so not sure if that buggered things up even more.

aplay -l lists the HDMI output, but the analog and digital say it's an ALC882?

card 0: SB [HDA ATI SB], device 0: ALC882 Analog [ALC882 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC882 Digital [ALC882 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Any ideas?

JoePub (joepubber) said : #5

Not quite sure if it's the same issue as I believe this issue was related to ALSA bug

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3746

Which says that a null pointer message appears in dmesg when trying to play via HDMI. I don't get a null pointer message is dmesg, I just hear no audio. Is this a different bug/issue?

Libin Yang (libin-yang) said : #6

"the analog and digital say it's an ALC882"
This is because ALC882 codec driver is used for many codecs, not only ALC882 codec. For example, ALC885 is using this codec driver too, so it will display ALC882 while using ALC885 codec. It is a tiny issue and Realtek should fix it.

"Not quite sure if it's the same issue as I believe this issue was related to ALSA bug"
Yes it is the same issue and patch is used to fix the null pointer message. If there is no null pointer message in dmesg, it means the bug has been fixed.

"I just hear no audio. Is this a different bug/issue?"
Yes, it is a different issue. HDMI audio should co-work with a proper graphics driver. If it is an ATI graphics card, a special graphics driver is needed. You can find the latest ATI driver from http://ati.amd.com/support/drivers/linux/linux-radeon.html to see if the card is already supported. You can contact ATI graphics driver team for a detail supporting list.

BTW, based on the info, "-Dhw:1" should be used, for example "aplay -Dhw:1 audiofile.wav".

Luís Louro (lapisdecor) said : #7

I have no sound on a new compaq with nvidia hdmi and cant tell if its the alsa driver. Do I need to copile the new alsa driver?

Cameron W (cwill747) said : #8

Thank you for taking the time to ask this question and learn about Ubuntu. We are sorry that we do not always have the capacity to look at all answers in a timely manner.

There have been many changes in Ubuntu since that time you asked your question and your problem may have been fixed with some of the updates. It would help us a lot if you could test the current Ubuntu version (11.10). If you can test it, and it is still an issue, we would appreciate if you could give us some updated information so we can better help you out. Thanks!

Hypotensive (hypotensive) said : #9

HDMI audio with nVidia card was working with Ubuntu 13, is now broken with Ubuntu 14. System configuration at http://www.alsa-project.org/db/?f=bdfe6ed8c871f6e8c2827a02ccb95ddf7f438128

Can you help with this problem?

Provide an answer of your own, or ask Libin Yang for more information if necessary.

To post a message you must log in.