All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hda: dinput_mux check
@ 2008-12-20 22:36 Matthew Ranostay
  2008-12-20 22:51 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Ranostay @ 2008-12-20 22:36 UTC (permalink / raw)
  To: alsa-devel; +Cc: takashi Iwai

Add check to determine if dinput_mux is set by any of patch_stac*() functions,
otherwise a invalid pointer my be referenced causing gibberish to mixer values.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
---
diff --git a/pci/hda/patch_sigmatel.c b/pci/hda/patch_sigmatel.c
index 70181d5..fa87893 100644
--- a/pci/hda/patch_sigmatel.c
+++ b/pci/hda/patch_sigmatel.c
@@ -3601,7 +3601,8 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
 		spec->mixers[spec->num_mixers++] = spec->kctls.list;
 
 	spec->input_mux = &spec->private_imux;
-	spec->dinput_mux = &spec->private_dimux;
+	if (!spec->dinput_mux)
+		spec->dinput_mux = &spec->private_dimux;
 	spec->sinput_mux = &spec->private_smux;
 	spec->mono_mux = &spec->private_mono_mux;
 	spec->amp_mux = &spec->private_amp_mux;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] hda: dinput_mux check
  2008-12-20 22:36 [PATCH] hda: dinput_mux check Matthew Ranostay
@ 2008-12-20 22:51 ` Takashi Iwai
  2008-12-20 22:53   ` Matthew Ranostay
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2008-12-20 22:51 UTC (permalink / raw)
  To: Matthew Ranostay; +Cc: alsa-devel

At Sat, 20 Dec 2008 17:36:28 -0500,
Matthew Ranostay wrote:
> 
> Add check to determine if dinput_mux is set by any of patch_stac*() functions,
> otherwise a invalid pointer my be referenced causing gibberish to mixer values.

Thanks, applied now.

BTW, which git tree are you checking?
For the latest STAC/IDT code, always check
  git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git


Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hda: dinput_mux check
  2008-12-20 22:51 ` Takashi Iwai
@ 2008-12-20 22:53   ` Matthew Ranostay
  0 siblings, 0 replies; 3+ messages in thread
From: Matthew Ranostay @ 2008-12-20 22:53 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:
> At Sat, 20 Dec 2008 17:36:28 -0500,
> Matthew Ranostay wrote:
>> Add check to determine if dinput_mux is set by any of patch_stac*() functions,
>> otherwise a invalid pointer my be referenced causing gibberish to mixer values.
> 
> Thanks, applied now.
> 
> BTW, which git tree are you checking?
> For the latest STAC/IDT code, always check
>   git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
> 
OK, will do.

I was using the alsa-kmirror.git tree.

Thanks,

Matt Ranostay

> 
> Takashi
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-20 22:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-20 22:36 [PATCH] hda: dinput_mux check Matthew Ranostay
2008-12-20 22:51 ` Takashi Iwai
2008-12-20 22:53   ` Matthew Ranostay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.