David Henningsson | 16 Aug 2012 14:11
Favicon

[PATCH v2] ALSA: hda - Don't send invalid volume knob command on IDT 92hd75bxx

Instead of blindly initializing a volume knob widget, first check
that there actually is a volume knob widget.

Signed-off-by: David Henningsson <david.henningsson <at> canonical.com>
---
 sound/pci/hda/patch_sigmatel.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 94040cc..ea5775a 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
 <at>  <at>  -4272,7 +4272,8  <at>  <at>  static int stac92xx_init(struct hda_codec *codec)
 	unsigned int gpio;
 	int i;

-	snd_hda_sequence_write(codec, spec->init);
+	if (spec->init)
+		snd_hda_sequence_write(codec, spec->init);

 	/* power down adcs initially */
 	if (spec->powerdown_adcs)
 <at>  <at>  -5748,7 +5749,6  <at>  <at>  again:
 		/* fallthru */
 	case 0x111d76b4: /* 6 Port without Analog Mixer */
 	case 0x111d76b5:
-		spec->init = stac92hd71bxx_core_init;
 		codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
 		spec->num_dmics = stac92xx_connected_ports(codec,
 					stac92hd71bxx_dmic_nids,
(Continue reading)

Takashi Iwai | 16 Aug 2012 14:16
Picon

Re: [PATCH v2] ALSA: hda - Don't send invalid volume knob command on IDT 92hd75bxx

At Thu, 16 Aug 2012 14:11:09 +0200,
David Henningsson wrote:
> 
> Instead of blindly initializing a volume knob widget, first check
> that there actually is a volume knob widget.
> 
> Signed-off-by: David Henningsson <david.henningsson <at> canonical.com>

Thanks, applied.

Takashi

> ---
>  sound/pci/hda/patch_sigmatel.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
> index 94040cc..ea5775a 100644
> --- a/sound/pci/hda/patch_sigmatel.c
> +++ b/sound/pci/hda/patch_sigmatel.c
>  <at>  <at>  -4272,7 +4272,8  <at>  <at>  static int stac92xx_init(struct hda_codec *codec)
>  	unsigned int gpio;
>  	int i;
>  
> -	snd_hda_sequence_write(codec, spec->init);
> +	if (spec->init)
> +		snd_hda_sequence_write(codec, spec->init);
>  
>  	/* power down adcs initially */
>  	if (spec->powerdown_adcs)
(Continue reading)


Gmane