* [PATCH] hda: incorrect DAC mixer on 92hd71bxxx
@ 2008-02-28 22:03 Matthew Ranostay
2008-02-29 10:14 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Ranostay @ 2008-02-28 22:03 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai, Tellman, Steven
If there was two line_outs[] it would overrun into the dmic nid struct below
and create a phantom "Surround" mixer.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
---
diff -r 54a51b975975 pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c Thu Feb 28 12:46:32 2008 +0100
+++ b/pci/hda/patch_sigmatel.c Thu Feb 28 16:52:43 2008 -0500
@@ -246,8 +246,8 @@ static hda_nid_t stac92hd71bxx_dmux_nids
0x1c,
};
-static hda_nid_t stac92hd71bxx_dac_nids[1] = {
- 0x10, /*0x11, */
+static hda_nid_t stac92hd71bxx_dac_nids[2] = {
+ 0x10, 0x11
};
#define STAC92HD71BXX_NUM_DMICS 2
@@ -2345,10 +2345,10 @@ static int stac92xx_auto_create_multi_ou
for (i = 0; i < cfg->line_outs; i++) {
- if (!spec->multiout.dac_nids[i])
+
+ nid = spec->multiout.dac_nids[i];
+ if (!nid || nid == spec->multiout.hp_nid)
continue;
-
- nid = spec->multiout.dac_nids[i];
if (i == 2) {
/* Center/LFE */
@@ -3550,7 +3550,7 @@ again:
spec->num_pwrs = ARRAY_SIZE(stac92hd71bxx_pwr_nids);
spec->pwr_nids = stac92hd71bxx_pwr_nids;
- spec->multiout.num_dacs = 1;
+ spec->multiout.num_dacs = ARRAY_SIZE(stac92hd71bxx_dac_nids);
spec->multiout.hp_nid = 0x11;
spec->multiout.dac_nids = stac92hd71bxx_dac_nids;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hda: incorrect DAC mixer on 92hd71bxxx
2008-02-28 22:03 [PATCH] hda: incorrect DAC mixer on 92hd71bxxx Matthew Ranostay
@ 2008-02-29 10:14 ` Takashi Iwai
2008-02-29 12:55 ` Matthew Ranostay
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2008-02-29 10:14 UTC (permalink / raw)
To: Matthew Ranostay; +Cc: alsa-devel, Tellman, Steven
At Thu, 28 Feb 2008 17:03:36 -0500,
Matthew Ranostay wrote:
>
> If there was two line_outs[] it would overrun into the dmic nid struct below
> and create a phantom "Surround" mixer.
My bad. But isn't the fix below simpler?
thanks,
Takashi
---
diff -r 54a51b975975 pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c Thu Feb 28 12:46:32 2008 +0100
+++ b/pci/hda/patch_sigmatel.c Fri Feb 29 11:17:54 2008 +0100
@@ -2344,7 +2344,7 @@ static int stac92xx_auto_create_multi_ou
unsigned int wid_caps, pincap;
- for (i = 0; i < cfg->line_outs; i++) {
+ for (i = 0; i < cfg->line_outs && i < spec->multiout.num_dacs; i++) {
if (!spec->multiout.dac_nids[i])
continue;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hda: incorrect DAC mixer on 92hd71bxxx
2008-02-29 10:14 ` Takashi Iwai
@ 2008-02-29 12:55 ` Matthew Ranostay
2008-02-29 13:22 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Ranostay @ 2008-02-29 12:55 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Feb 29, 2008, at 5:14 AM, Takashi Iwai wrote:
> At Thu, 28 Feb 2008 17:03:36 -0500,
> Matthew Ranostay wrote:
>>
>> If there was two line_outs[] it would overrun into the dmic nid
>> struct below
>> and create a phantom "Surround" mixer.
>
> My bad. But isn't the fix below simpler?
>
Yes it is :)
>
> thanks,
>
> Takashi
>
> ---
> diff -r 54a51b975975 pci/hda/patch_sigmatel.c
> --- a/pci/hda/patch_sigmatel.c Thu Feb 28 12:46:32 2008 +0100
> +++ b/pci/hda/patch_sigmatel.c Fri Feb 29 11:17:54 2008 +0100
> @@ -2344,7 +2344,7 @@ static int stac92xx_auto_create_multi_ou
> unsigned int wid_caps, pincap;
>
>
> - for (i = 0; i < cfg->line_outs; i++) {
> + for (i = 0; i < cfg->line_outs && i < spec->multiout.num_dacs; i+
> +) {
> if (!spec->multiout.dac_nids[i])
> continue;
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hda: incorrect DAC mixer on 92hd71bxxx
2008-02-29 12:55 ` Matthew Ranostay
@ 2008-02-29 13:22 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2008-02-29 13:22 UTC (permalink / raw)
To: Matthew Ranostay; +Cc: alsa-devel
At Fri, 29 Feb 2008 07:55:00 -0500,
Matthew Ranostay wrote:
>
>
> On Feb 29, 2008, at 5:14 AM, Takashi Iwai wrote:
>
> > At Thu, 28 Feb 2008 17:03:36 -0500,
> > Matthew Ranostay wrote:
> >>
> >> If there was two line_outs[] it would overrun into the dmic nid
> >> struct below
> >> and create a phantom "Surround" mixer.
> >
> > My bad. But isn't the fix below simpler?
> >
> Yes it is :)
OK, now fixed on HG. Thanks.
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-29 13:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-28 22:03 [PATCH] hda: incorrect DAC mixer on 92hd71bxxx Matthew Ranostay
2008-02-29 10:14 ` Takashi Iwai
2008-02-29 12:55 ` Matthew Ranostay
2008-02-29 13:22 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox