Re: [Intel-gfx] intel-hda: sound via HDMI only when using interlaced modes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux