]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums
authorAaron Plattner <aplattner@nvidia.com>
Thu, 7 Apr 2011 00:19:04 +0000 (17:19 -0700)
committerTakashi Iwai <tiwai@suse.de>
Thu, 7 Apr 2011 10:04:00 +0000 (12:04 +0200)
commit22f90861eafc73200ed15c0b1f7bdd55eaf4667c
tree581c73653ee3f02dd9e695cb420d58ce9450b874
parent4c19f6e7e93a1cd447ec0180b9c4a28ba2a73928
ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums

The MCP7x hardware computes the audio infoframe channel count
automatically, but requires the audio driver to set the audio
infoframe checksum manually via the Nv_VERB_SET_Info_Frame_Checksum
control verb.

When audio starts playing, nvhdmi_8ch_7x_pcm_prepare sets the checksum
to (0x71 - chan - chanmask).  For example, for 2ch audio, chan == 1
and chanmask == 0 so the checksum is set to 0x70.  When audio playback
finishes and the device is closed, nvhdmi_8ch_7x_pcm_close resets the
channel formats, causing the channel count to revert to 8ch.  Since
the checksum is not reset, the hardware starts generating audio
infoframes with invalid checksums.  This causes some displays to blank
the video.

Fix this by updating the checksum and channel mask when the device is
closed and also when it is first initialized.  In addition, make sure
that the channel mask is appropriate for an 8ch infoframe by setting
it to 0x13 (FL FR LFE FC RL RR RLC RRC).

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c