* Re: Lenovo two codecs machine workaround
[not found] ` <s5hd1c0hoct.wl-tiwai@suse.de>
@ 2017-04-25 9:30 ` Kailang
2017-04-26 16:12 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Kailang @ 2017-04-25 9:30 UTC (permalink / raw)
To: Takashi Iwai; +Cc: (alsa-devel@alsa-project.org)
[-- Attachment #1: Type: text/plain, Size: 588 bytes --]
Attach again.
C.c. to alsa-devel.
This patch is dual codecs workarround code for Lenovo platform.
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Tuesday, April 25, 2017 4:40 PM
> To: Kailang
> Subject: Re: Lenovo two codecs machine workaround
>
> On Tue, 25 Apr 2017 10:35:24 +0200,
> Kailang wrote:
> >
> >
> > Attach is the support patch for Lenovo dual codecs.
>
> Looks good. Could you submit to alsa-devel ML?
>
>
> thanks,
>
> Takashi
>
> ------Please consider the environment before printing this e-mail.
>
[-- Attachment #2: 0001-Lenovo-dual-codecs.patch --]
[-- Type: application/octet-stream, Size: 3918 bytes --]
From 166ff8596cef9ff38040653d4b9f3ac1f2e6d48b Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Tue, 25 Apr 2017 16:17:40 +0800
Subject: [PATCH] ALSA: hda/realtek - Add Dual Codecs support for Lenovo
P520/420
Lenovo P520/420 build with two codecs.
ALC233 for front panel.
ALC662 for rear panel.
This patch will rename capture name for slove conflicts.
And create a card longname for UCM profile.
Signed-off-by: Kailang Yang <kailang@realtek.com>
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 93846bf..58df440 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4824,6 +4824,30 @@ static void alc280_fixup_hp_9480m(struct hda_codec *codec,
}
}
+static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec,
+ const struct hda_fixup *fix,
+ int action)
+{
+ alc_fixup_dual_codecs(codec, fix, action);
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ /* override card longname to provide a unique UCM profile */
+ strcpy(codec->card->longname, "HDAudio-Lenovo-DualCodecs");
+ break;
+ case HDA_FIXUP_ACT_BUILD:
+ /* rename Capture controls depending on the codec */
+ rename_ctl(codec, "Capture Volume",
+ codec->addr == 0 ?
+ "Rear-Panel Capture Volume" :
+ "Front-Panel Capture Volume");
+ rename_ctl(codec, "Capture Switch",
+ codec->addr == 0 ?
+ "Rear-Panel Capture Switch" :
+ "Front-Panel Capture Switch");
+ break;
+ }
+}
+
/* for hda_fixup_thinkpad_acpi() */
#include "thinkpad_helper.c"
@@ -4937,6 +4961,7 @@ enum {
ALC256_FIXUP_ASUS_AIO_GPIO2,
ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
+ ALC233_FIXUP_LENOVO_MULTI_CODECS,
};
static const struct hda_fixup alc269_fixups[] = {
@@ -5706,6 +5731,10 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
},
+ [ALC233_FIXUP_LENOVO_MULTI_CODECS] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc233_alc662_fixup_lenovo_dual_codecs,
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -5860,6 +5889,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
+ SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
@@ -6881,6 +6911,7 @@ enum {
ALC892_FIXUP_ASROCK_MOBO,
ALC662_FIXUP_USI_FUNC,
ALC662_FIXUP_USI_HEADSET_MODE,
+ ALC662_FIXUP_LENOVO_MULTI_CODECS,
};
static const struct hda_fixup alc662_fixups[] = {
@@ -7186,6 +7217,10 @@ static const struct hda_fixup alc662_fixups[] = {
.chained = true,
.chain_id = ALC662_FIXUP_USI_FUNC
},
+ [ALC662_FIXUP_LENOVO_MULTI_CODECS] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc233_alc662_fixup_lenovo_dual_codecs,
+ },
};
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -7223,6 +7258,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE),
+ SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS),
SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Lenovo two codecs machine workaround
2017-04-25 9:30 ` Lenovo two codecs machine workaround Kailang
@ 2017-04-26 16:12 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2017-04-26 16:12 UTC (permalink / raw)
To: Kailang; +Cc: (alsa-devel@alsa-project.org)
On Tue, 25 Apr 2017 11:30:50 +0200,
Kailang wrote:
>
>
> Attach again.
> C.c. to alsa-devel.
>
> This patch is dual codecs workarround code for Lenovo platform.
Applied, thanks.
Takashi
>
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@suse.de]
> > Sent: Tuesday, April 25, 2017 4:40 PM
> > To: Kailang
> > Subject: Re: Lenovo two codecs machine workaround
> >
> > On Tue, 25 Apr 2017 10:35:24 +0200,
> > Kailang wrote:
> > >
> > >
> > > Attach is the support patch for Lenovo dual codecs.
> >
> > Looks good. Could you submit to alsa-devel ML?
> >
> >
> > thanks,
> >
> > Takashi
> >
> > ------Please consider the environment before printing this e-mail.
> >
> [2 0001-Lenovo-dual-codecs.patch <application/octet-stream (base64)>]
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-26 16:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <6FAB7C47BCF00940BB0999A99BE3547A17A4C72A@RTITMBSV09.realtek.com.tw>
[not found] ` <s5hfujn8y3q.wl-tiwai@suse.de>
[not found] ` <s5ho9y9yv75.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A17A4DCB9@RTITMBSV09.realtek.com.tw>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A17A4DCE6@RTITMBSV09.realtek.com.tw>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A17A4DDE5@RTITMBSV09.realtek.com.tw>
[not found] ` <CAH5Jhw-ZjKEKP19fR1F6fnL09SLuQom84xsH_2s-m5=tqAvrAw@mail.gmail.com>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A17A4E8DF@RTITMBSV09.realtek.com.tw>
[not found] ` <s5hh92ol9sr.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A17A4EB0F@RTITMBSV09.realtek.com.tw>
[not found] ` <s5hfui4rtpe.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A17A4ED53@RTITMBSV09.realtek.com.tw>
[not found] ` <s5ha88bf9r6.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A17A53D58@RTITMBSV09.realtek.com.tw>
[not found] ` <s5hinmc6983.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A17A53EED@RTITMBSV09.realtek.com.tw>
[not found] ` <s5hh91wwe48.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A183EC985@RTITMBSV02.realtek.com.tw>
[not found] ` <s5h1sspsnwg.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A183ECADD@RTITMBSV02.realtek.com.tw>
[not found] ` <s5hr30no3gq.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A183ECAF5@RTITMBSV02.realtek.com.tw>
[not found] ` <s5ha87am94v.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A183ECDAF@RTITMBSV02.realtek.com.tw>
[not found] ` <s5hinlujmeu.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A183ECDFB@RTITMBSV02.realtek.com.tw>
[not found] ` <s5hr30ib39a.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A183ECE10@RTITMBSV02.realtek.com.tw>
[not found] ` <s5hinlub0rp.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A183ECEA8@RTITMBSV02.realtek.com.tw>
[not found] ` <s5hd1c0hoct.wl-tiwai@suse.de>
2017-04-25 9:30 ` Lenovo two codecs machine workaround Kailang
2017-04-26 16:12 ` 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.