All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: alsa-user@lists.sourceforge.net, intel-gfx@lists.freedesktop.org
Subject: Re: [Alsa-user] intel-hda: sound via HDMI only when using interlaced modes
Date: Tue, 19 Feb 2013 00:44:51 +0100	[thread overview]
Message-ID: <20130218234451.GA32529@hardeman.nu> (raw)
In-Reply-To: <20130207100013.GO5813@phenom.ffwll.local>

On Thu, Feb 07, 2013 at 11:00:13AM +0100, Daniel Vetter wrote:
>On Wed, Feb 06, 2013 at 10:35:33PM +0100, David Härdeman wrote:
>> a) switching between 1080p30 and 1080p50 or 1080p60 is enough to make
>> the sound go away (higher frame rates) or work (1080p30). So, it has
>> nothing to do with interlacing.
>
>I'm far away from an hdmi/snd expert, but iirc the bandwidth to squeeze
>hdmi sound packets between the video frames is limited. And atm our code
>does not bother with checking for that at all (and updating the
>capabilities of the hdmi snd widget). But that's just an idea, I have no
>idea how much bandwidth there actually is.

I spent some time this weekend dumping the audio related registers while
outputting a stereo stream under Windows.

It turns out that 48kHz stereo audio works under windows (16bit, 48kHz
stereo audio is the default setting in Win7 for a shared audio device)
while 44.1kHz doesn't (with the Pioneer SC LX-76 receiver).

I've also tested with a different receiver (Marantz SR8002) and it
happily accepts 44.1kHz and 48kHz stereo audio (only tested with Win7)
so I'm guessing that the Pioneer receiver is being picky and/or buggy
(esp. with regard to 44.1kHz audio).

Anyway, since 48kHz audio works under Windows and not under Linux, the
Windows driver was doing something right.

I've narrowed it down to the "Pixel_Clock(HDMI)" bits (19:16) in
register AUD_CONFIG_A. The Linux driver currently sets the entire
register blindly to 0x0 (see the write to "aud_config" in
ironlake_write_eld() in drivers/gpu/drm/i915/intel_display.c) while it
should set those bits in accordance with the HDMI pixel clock of the
mode that is about to be set (which the Windows driver does).

Manually setting those bits to eg 0x9 (which would be the correct value
for a 1080p60 mode which uses a 148.5Mhz pixel clock) gets me working
48kHz audio (i.e. feature parity with Windows) when running in 1080p60.

(And on a big sidenote...the value 0x6, which corresponds to a
74.25/1.001 Mhz pixel clock, gets me working 44.1kHz *and* 48kHz audio
no matter what the resolution/refresh rate is...must be some kind of
Pioneer quirk...but I'm happy it exists).

I could write a patch, but the Intel docs (IHD-OS-V3 Pt 4, section
4.2.1, pp 87 - 88) are a bit terse so I'm a bit nervous about whether
I'd get it right or not...

-- 
David Härdeman

  parent reply	other threads:[~2013-02-18 23:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130129221826.GA11723@hardeman.nu>
2013-02-06 21:35 ` intel-hda: sound via HDMI only when using interlaced modes David Härdeman
2013-02-07 10:00   ` [Alsa-user] " Daniel Vetter
2013-02-10  1:16     ` David Härdeman
2013-02-11 11:09       ` Takashi Iwai
2013-02-18 23:44     ` David Härdeman [this message]
2013-10-09  9:09 Jasper Smet
2013-10-09 10:34 ` Daniel Vetter
2013-10-09 10:44   ` Jasper Smet
2013-10-09 11:01     ` Daniel Vetter
2013-10-09 11:28       ` Jasper Smet
2013-10-09 18:27         ` Jasper Smet
2013-10-10  5:57           ` Jani Nikula
2013-10-10  6:59             ` Jasper Smet
2013-10-10  8:08               ` Jani Nikula
2013-10-10  8:27                 ` Jani Nikula
2013-10-10  8:36                   ` Jasper Smet
2013-10-10  8:38                     ` Jani Nikula
2013-10-10  8:53                       ` Jasper Smet
2013-10-11  6:25                         ` Jasper Smet
2013-10-11  7:06                           ` Jani Nikula
2013-10-12 11:51                             ` Jasper Smet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130218234451.GA32529@hardeman.nu \
    --to=david@hardeman.nu \
    --cc=alsa-user@lists.sourceforge.net \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.