diff mbox

ALSA: hda - Fix subsystem ID read regression

Message ID 1427884980-18548-1-git-send-email-david.henningsson@canonical.com (mailing list archive)
State Accepted
Commit ffda568e8b4979c6a04bbdd92acfd93b5dc5e163
Headers show

Commit Message

David Henningsson April 1, 2015, 10:43 a.m. UTC
A regression was introduced in 7639a06c23c7d4cda3: if AC_PAR_SUBSYSTEM_ID
reads as zero, one should retry using AC_VERB_GET_SUBSYSTEM_ID.

This seems to hit many codecs (my own laptop included), and causes
quirks for some machines not to apply correctly.

Reported-by: TienFu Chen <tienfu.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 sound/hda/hdac_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai April 4, 2015, 12:13 p.m. UTC | #1
At Wed,  1 Apr 2015 12:43:00 +0200,
David Henningsson wrote:
> 
> A regression was introduced in 7639a06c23c7d4cda3: if AC_PAR_SUBSYSTEM_ID
> reads as zero, one should retry using AC_VERB_GET_SUBSYSTEM_ID.
> 
> This seems to hit many codecs (my own laptop included), and causes
> quirks for some machines not to apply correctly.
> 
> Reported-by: TienFu Chen <tienfu.chen@canonical.com>
> Signed-off-by: David Henningsson <david.henningsson@canonical.com>

Thanks, applied.


Takashi

> ---
>  sound/hda/hdac_device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
> index 6e8ee1d..53b6b95 100644
> --- a/sound/hda/hdac_device.c
> +++ b/sound/hda/hdac_device.c
> @@ -91,7 +91,7 @@ int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus,
>  
>  	codec->power_caps = snd_hdac_read_parm(codec, fg, AC_PAR_POWER_STATE);
>  	/* reread ssid if not set by parameter */
> -	if (codec->subsystem_id == -1)
> +	if (codec->subsystem_id == -1 || codec->subsystem_id == 0)
>  		snd_hdac_read(codec, fg, AC_VERB_GET_SUBSYSTEM_ID, 0,
>  			      &codec->subsystem_id);
>  
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index 6e8ee1d..53b6b95 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -91,7 +91,7 @@  int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus,
 
 	codec->power_caps = snd_hdac_read_parm(codec, fg, AC_PAR_POWER_STATE);
 	/* reread ssid if not set by parameter */
-	if (codec->subsystem_id == -1)
+	if (codec->subsystem_id == -1 || codec->subsystem_id == 0)
 		snd_hdac_read(codec, fg, AC_VERB_GET_SUBSYSTEM_ID, 0,
 			      &codec->subsystem_id);