summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2010-03-26 10:28:46 +0100
committerJaroslav Kysela <perex@perex.cz>2010-03-26 10:37:39 +0100
commitcd508fe58b07499403e806b558c7f15c90442292 (patch)
tree5ec4c40b7c7b84595c65f5f9dda96e1a01eacc2b /sound/pci/hda/hda_codec.c
parent306ff3e473a970f88680e8355c0900fcab0357e2 (diff)
downloadlinux-stable-cd508fe58b07499403e806b558c7f15c90442292.tar.gz
linux-stable-cd508fe58b07499403e806b558c7f15c90442292.tar.bz2
linux-stable-cd508fe58b07499403e806b558c7f15c90442292.zip
ALSA: hda-intel - add special 'hwio' model to bypass initialization
Using the 'model=hwio' option, the driver bypasses any codec initialization and the reset procedure for codecs is also bypassed. This mode is usefull to enable direct access using hwdep interface (using hdaverb or hda-analyzer tools) and retain codec setup from BIOS. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 0e76ac2b2ace..cf6280bdaa19 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -609,11 +609,15 @@ int /*__devinit*/ snd_hda_bus_new(struct snd_card *card,
}
EXPORT_SYMBOL_HDA(snd_hda_bus_new);
+#define is_hwio_config(codec) \
+ (codec->modelname && !strcmp(codec->modelname, "hwio"))
#ifdef CONFIG_SND_HDA_GENERIC
#define is_generic_config(codec) \
- (codec->modelname && !strcmp(codec->modelname, "generic"))
+ ((codec->modelname && !strcmp(codec->modelname, "generic")) || \
+ is_hwio_config(codec))
#else
-#define is_generic_config(codec) 0
+#define is_generic_config(codec) \
+ is_hwio_config(codec)
#endif
#ifdef MODULE
@@ -1113,6 +1117,8 @@ int snd_hda_codec_configure(struct hda_codec *codec)
}
if (is_generic_config(codec)) {
+ if (is_hwio_config(codec))
+ goto patched;
err = snd_hda_parse_generic_codec(codec);
goto patched;
}