From 10e77ddac0e1f3b9cea04dfe8180f8641f329703 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 26 Mar 2010 11:04:38 +0100 Subject: [PATCH] ALSA: hda-intel - remove model=hwio , use probe_only=3 instead The probe_only module parameter skips the codec initialization, too. Remove the model=hwio code and use second bit in probe_only to skip the HDA codec reset procedure. Signed-off-by: Jaroslav Kysela --- Documentation/sound/alsa/HD-Audio.txt | 3 +++ sound/pci/hda/hda_codec.c | 10 ++-------- sound/pci/hda/hda_intel.c | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt index ecacf53a8655..232a90775229 100644 --- a/Documentation/sound/alsa/HD-Audio.txt +++ b/Documentation/sound/alsa/HD-Audio.txt @@ -597,6 +597,9 @@ probing, the proc file is available, so you can get the raw codec information before modified by the driver. Of course, the driver isn't usable with `probe_only=1`. But you can continue the configuration via hwdep sysfs file if hda-reconfig option is enabled. +Using `probe_only` mask 2 skips the reset of HDA codecs (use +`probe_only=3` as module option). The hwdep interface can be used +to determine the BIOS codec initialization. hda-verb diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index cf6280bdaa19..0e76ac2b2ace 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -609,15 +609,11 @@ 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")) || \ - is_hwio_config(codec)) + (codec->modelname && !strcmp(codec->modelname, "generic")) #else -#define is_generic_config(codec) \ - is_hwio_config(codec) +#define is_generic_config(codec) 0 #endif #ifdef MODULE @@ -1117,8 +1113,6 @@ 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; } diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 8d477613bccf..6ce673c17ff2 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2577,7 +2577,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, /* initialize chip */ azx_init_pci(chip); - azx_init_chip(chip, model[dev] == NULL || strcmp(model[dev], "hwio")); + azx_init_chip(chip, (probe_only[dev] & 2) == 0); /* codec detection */ if (!chip->codec_mask) { @@ -2666,7 +2666,7 @@ static int __devinit azx_probe(struct pci_dev *pci, goto out_free; } #endif - if (!probe_only[dev]) { + if ((probe_only[dev] & 1) == 0) { err = azx_codec_configure(chip); if (err < 0) goto out_free; -- 2.20.1