ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser
authorTakashi Iwai <tiwai@suse.de>
Tue, 11 Jan 2011 17:11:04 +0000 (18:11 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:14:06 +0000 (15:14 -0800)
commitde45d781cf5115e12fefe85f531f0eae26a1e16a
tree3c70184a147629b0b04d4905798901dca03b4862
parent1ef29de9afab9ce5cfcc22895cda4090958cbca3
ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser

commit 0ebaa24c6b1f62839bcd12d63fa76e3cf23b9bd0 upstream.

The dynamic PCM restriction based on ELD information may lead to the
problem in some cases, e.g. when the receiver is turned off.  Then it
may send a TV HDMI default such as channels = 2.  Since it's still
plugged, the driver doesn't know whether it's the right configuration
for future use.  Now, when an app opens the device at this moment,
then turn on the receiver, the app still sends channels=2.

The right solution is to implement some kind of notification and
automatic re-open mechanism.  But, this is a goal far ahead.

This patch provides a workaround for such a case by providing a new
module option static_hdmi_pcm for snd-hda-codec-hdmi module.  When
this is set to true, the driver doesn't change PCM parameters per
ELD information.  For users who need the static configuration like
the scenario above, set this to true.

The parameter can be changed dynamically via sysfs, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/pci/hda/patch_hdmi.c