* [PATCH] ALSA: hda/realtek - Fix detection of ALC271X codec
@ 2012-09-27 13:38 Herton Ronaldo Krzesinski
2012-09-27 13:50 ` David Henningsson
0 siblings, 1 reply; 4+ messages in thread
From: Herton Ronaldo Krzesinski @ 2012-09-27 13:38 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, David Henningsson
In commit af741c1 ("ALSA: hda/realtek - Call alc_auto_parse_customize_define()
always after fixup"), alc_auto_parse_customize_define was moved after
detection of ALC271X.
The problem is that detection of ALC271X relies on spec->cdefine.platform_type,
and it's set on alc_auto_parse_customize_define.
Move the alc_auto_parse_customize_define and its required fixup setup
before the block doing the ALC271X and other codec setup.
BugLink: https://bugs.launchpad.net/bugs/1006690
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
sound/pci/hda/patch_realtek.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
It looks safe to move the functions before the block
"if (codec->vendor_id == 0x10ec0269) {", as nothing on the fixups seems
to depend on what's done there. But if wanted we could just move the
detection/codec rename of ALC271X below too.
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index c4c4b01..3b187e9 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6273,6 +6273,12 @@ static int patch_alc269(struct hda_codec *codec)
spec = codec->spec;
+ alc_pick_fixup(codec, alc269_fixup_models,
+ alc269_fixup_tbl, alc269_fixups);
+ alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
+
+ alc_auto_parse_customize_define(codec);
+
if (codec->vendor_id == 0x10ec0269) {
spec->codec_variant = ALC269_TYPE_ALC269VA;
switch (alc_get_coef0(codec) & 0x00f0) {
@@ -6300,12 +6306,6 @@ static int patch_alc269(struct hda_codec *codec)
alc269_fill_coef(codec);
}
- alc_pick_fixup(codec, alc269_fixup_models,
- alc269_fixup_tbl, alc269_fixups);
- alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
-
- alc_auto_parse_customize_define(codec);
-
/* automatic parse from the BIOS config */
err = alc269_parse_auto_config(codec);
if (err < 0)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: hda/realtek - Fix detection of ALC271X codec
2012-09-27 13:38 [PATCH] ALSA: hda/realtek - Fix detection of ALC271X codec Herton Ronaldo Krzesinski
@ 2012-09-27 13:50 ` David Henningsson
2012-09-27 14:04 ` Herton Ronaldo Krzesinski
0 siblings, 1 reply; 4+ messages in thread
From: David Henningsson @ 2012-09-27 13:50 UTC (permalink / raw)
To: Herton Ronaldo Krzesinski; +Cc: Takashi Iwai, alsa-devel
On 09/27/2012 03:38 PM, Herton Ronaldo Krzesinski wrote:
> In commit af741c1 ("ALSA: hda/realtek - Call alc_auto_parse_customize_define()
> always after fixup"), alc_auto_parse_customize_define was moved after
> detection of ALC271X.
>
> The problem is that detection of ALC271X relies on spec->cdefine.platform_type,
> and it's set on alc_auto_parse_customize_define.
>
> Move the alc_auto_parse_customize_define and its required fixup setup
> before the block doing the ALC271X and other codec setup.
>
> BugLink: https://bugs.launchpad.net/bugs/1006690
> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Looks good. I would add a cc to stable though.
Reviewed-by: David Henningsson <david.henningsson@canonical.com>
> ---
> sound/pci/hda/patch_realtek.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> It looks safe to move the functions before the block
> "if (codec->vendor_id == 0x10ec0269) {", as nothing on the fixups seems
> to depend on what's done there. But if wanted we could just move the
> detection/codec rename of ALC271X below too.
>
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index c4c4b01..3b187e9 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -6273,6 +6273,12 @@ static int patch_alc269(struct hda_codec *codec)
>
> spec = codec->spec;
>
> + alc_pick_fixup(codec, alc269_fixup_models,
> + alc269_fixup_tbl, alc269_fixups);
> + alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
> +
> + alc_auto_parse_customize_define(codec);
> +
> if (codec->vendor_id == 0x10ec0269) {
> spec->codec_variant = ALC269_TYPE_ALC269VA;
> switch (alc_get_coef0(codec) & 0x00f0) {
> @@ -6300,12 +6306,6 @@ static int patch_alc269(struct hda_codec *codec)
> alc269_fill_coef(codec);
> }
>
> - alc_pick_fixup(codec, alc269_fixup_models,
> - alc269_fixup_tbl, alc269_fixups);
> - alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
> -
> - alc_auto_parse_customize_define(codec);
> -
> /* automatic parse from the BIOS config */
> err = alc269_parse_auto_config(codec);
> if (err < 0)
>
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: hda/realtek - Fix detection of ALC271X codec
2012-09-27 13:50 ` David Henningsson
@ 2012-09-27 14:04 ` Herton Ronaldo Krzesinski
2012-10-08 8:15 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Herton Ronaldo Krzesinski @ 2012-09-27 14:04 UTC (permalink / raw)
To: David Henningsson; +Cc: Takashi Iwai, alsa-devel
On Thu, Sep 27, 2012 at 03:50:04PM +0200, David Henningsson wrote:
> On 09/27/2012 03:38 PM, Herton Ronaldo Krzesinski wrote:
> >In commit af741c1 ("ALSA: hda/realtek - Call alc_auto_parse_customize_define()
> >always after fixup"), alc_auto_parse_customize_define was moved after
> >detection of ALC271X.
> >
> >The problem is that detection of ALC271X relies on spec->cdefine.platform_type,
> >and it's set on alc_auto_parse_customize_define.
> >
> >Move the alc_auto_parse_customize_define and its required fixup setup
> >before the block doing the ALC271X and other codec setup.
> >
> >BugLink: https://bugs.launchpad.net/bugs/1006690
> >Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
>
> Looks good. I would add a cc to stable though.
>
> Reviewed-by: David Henningsson <david.henningsson@canonical.com>
Thanks. Indeed, we should add a cc stable to this one (3.4+), forgot
about it.
--
[]'s
Herton
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: hda/realtek - Fix detection of ALC271X codec
2012-09-27 14:04 ` Herton Ronaldo Krzesinski
@ 2012-10-08 8:15 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2012-10-08 8:15 UTC (permalink / raw)
To: Herton Ronaldo Krzesinski; +Cc: alsa-devel, David Henningsson
At Thu, 27 Sep 2012 11:04:35 -0300,
Herton Ronaldo Krzesinski wrote:
>
> On Thu, Sep 27, 2012 at 03:50:04PM +0200, David Henningsson wrote:
> > On 09/27/2012 03:38 PM, Herton Ronaldo Krzesinski wrote:
> > >In commit af741c1 ("ALSA: hda/realtek - Call alc_auto_parse_customize_define()
> > >always after fixup"), alc_auto_parse_customize_define was moved after
> > >detection of ALC271X.
> > >
> > >The problem is that detection of ALC271X relies on spec->cdefine.platform_type,
> > >and it's set on alc_auto_parse_customize_define.
> > >
> > >Move the alc_auto_parse_customize_define and its required fixup setup
> > >before the block doing the ALC271X and other codec setup.
> > >
> > >BugLink: https://bugs.launchpad.net/bugs/1006690
> > >Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
> >
> > Looks good. I would add a cc to stable though.
> >
> > Reviewed-by: David Henningsson <david.henningsson@canonical.com>
>
> Thanks. Indeed, we should add a cc stable to this one (3.4+), forgot
> about it.
Thanks, I applied the patch with Cc to stable.
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-08 8:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27 13:38 [PATCH] ALSA: hda/realtek - Fix detection of ALC271X codec Herton Ronaldo Krzesinski
2012-09-27 13:50 ` David Henningsson
2012-09-27 14:04 ` Herton Ronaldo Krzesinski
2012-10-08 8:15 ` Takashi Iwai
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.