* [PATCH] ALSA: hda - Add multifunction jack support for ALC255 @ 2013-11-07 13:08 David Henningsson 2013-11-07 13:22 ` Takashi Iwai 0 siblings, 1 reply; 8+ messages in thread From: David Henningsson @ 2013-11-07 13:08 UTC (permalink / raw) To: tiwai, alsa-devel; +Cc: 1248949, kailang, David Henningsson From: Kailang Yang <kailang@realtek.com> The new codec ALC255 needs its own set of verbs to enable multifunction jacks. (Context and whitespace adjustments by David Henningsson) BugLink: https://bugs.launchpad.net/bugs/1248949 Tested-by: Doro Wu <doro.wu@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> --- sound/pci/hda/patch_realtek.c | 91 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index daf7205..ceadd65 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -588,6 +588,18 @@ static int alc_read_coef_idx(struct hda_codec *codec, return val; } +static int alc_read_coefex_idx(struct hda_codec *codec, + hda_nid_t nid, + unsigned int coef_idx) +{ + unsigned int val; + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, + coef_idx); + val = snd_hda_codec_read(codec, nid, 0, + AC_VERB_GET_PROC_COEF, 0); + return val; +} + static void alc_write_coef_idx(struct hda_codec *codec, unsigned int coef_idx, unsigned int coef_val) { @@ -597,6 +609,15 @@ static void alc_write_coef_idx(struct hda_codec *codec, unsigned int coef_idx, coef_val); } +static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, + unsigned int coef_idx, unsigned int coef_val) +{ + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, + coef_idx); + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, + coef_val); +} + /* a special bypass for COEF 0; read the cached value at the second time */ static unsigned int alc_get_coef0(struct hda_codec *codec) { @@ -3109,6 +3130,14 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) int val; switch (codec->vendor_id) { + case 0x10ec0255: + alc_write_coef_idx(codec, 0x1b, 0x0c0b); + alc_write_coef_idx(codec, 0x45, 0xd089); + val = alc_read_coefex_idx(codec, 0x57, 0x05); + alc_write_coefex_idx(codec, 0x57, 0x05, val & ~(1<<14)); + alc_write_coef_idx(codec, 0x06, 0x6104); + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8aa6); + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x1b, 0x0c0b); alc_write_coef_idx(codec, 0x45, 0xc429); @@ -3140,6 +3169,13 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, int val; switch (codec->vendor_id) { + case 0x10ec0255: + alc_write_coef_idx(codec, 0x45, 0xc489); + snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8aa6); + alc_write_coef_idx(codec, 0x06, 0x6100); + snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x45, 0xc429); snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); @@ -3171,6 +3207,12 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, static void alc_headset_mode_default(struct hda_codec *codec) { switch (codec->vendor_id) { + case 0x10ec0255: + alc_write_coef_idx(codec, 0x45, 0xc089); + alc_write_coef_idx(codec, 0x45, 0xc489); + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8ea6); + alc_write_coef_idx(codec, 0x49, 0x0049); + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x06, 0x2100); alc_write_coef_idx(codec, 0x32, 0x4ea3); @@ -3194,6 +3236,11 @@ static void alc_headset_mode_default(struct hda_codec *codec) static void alc_headset_mode_ctia(struct hda_codec *codec) { switch (codec->vendor_id) { + case 0x10ec0255: + alc_write_coef_idx(codec, 0x45, 0xd489); + alc_write_coef_idx(codec, 0x1b, 0x0c2b); + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8ea6); + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x45, 0xd429); alc_write_coef_idx(codec, 0x1b, 0x0c2b); @@ -3216,6 +3263,11 @@ static void alc_headset_mode_ctia(struct hda_codec *codec) static void alc_headset_mode_omtp(struct hda_codec *codec) { switch (codec->vendor_id) { + case 0x10ec0255: + alc_write_coef_idx(codec, 0x45, 0xe489); + alc_write_coef_idx(codec, 0x1b, 0x0c2b); + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8ea6); + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x45, 0xe429); alc_write_coef_idx(codec, 0x1b, 0x0c2b); @@ -3241,6 +3293,13 @@ static void alc_determine_headset_type(struct hda_codec *codec) struct alc_spec *spec = codec->spec; switch (codec->vendor_id) { + case 0x10ec0255: + alc_write_coef_idx(codec, 0x45, 0xd089); + alc_write_coef_idx(codec, 0x49, 0x0149); + msleep(300); + val = alc_read_coef_idx(codec, 0x46); + is_ctia = (val & 0x0070) == 0x0070; + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x45, 0xd029); msleep(300); @@ -3387,6 +3446,20 @@ static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, alc_fixup_headset_mode(codec, fix, action); } +static void alc_fixup_headset_mode_alc255(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + if (action == HDA_FIXUP_ACT_PRE_PROBE) { + alc_write_coef_idx(codec, 0x1b, 0x880b); + alc_write_coef_idx(codec, 0x45, 0xd089); + alc_write_coef_idx(codec, 0x1b, 0x080b); + alc_write_coef_idx(codec, 0x46, 0x0004); + alc_write_coef_idx(codec, 0x1b, 0x0c0b); + msleep(30); + } + alc_fixup_headset_mode(codec, fix, action); +} + static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, const struct hda_fixup *fix, int action) { @@ -3686,6 +3759,8 @@ enum { ALC283_FIXUP_INT_MIC, ALC290_FIXUP_MONO_SPEAKERS, ALC269_FIXUP_THINKPAD_ACPI, + ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, + ALC255_FIXUP_HEADSET_MODE, }; static const struct hda_fixup alc269_fixups[] = { @@ -3995,6 +4070,20 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST }, + [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ + { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ + { } + }, + .chained = true, + .chain_id = ALC255_FIXUP_HEADSET_MODE + }, + [ALC255_FIXUP_HEADSET_MODE] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_headset_mode_alc255, + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -4037,6 +4126,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), + SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] ALSA: hda - Add multifunction jack support for ALC255 2013-11-07 13:08 [PATCH] ALSA: hda - Add multifunction jack support for ALC255 David Henningsson @ 2013-11-07 13:22 ` Takashi Iwai 2013-11-07 13:32 ` David Henningsson 0 siblings, 1 reply; 8+ messages in thread From: Takashi Iwai @ 2013-11-07 13:22 UTC (permalink / raw) To: David Henningsson; +Cc: 1248949, alsa-devel, kailang At Thu, 7 Nov 2013 14:08:41 +0100, David Henningsson wrote: > > From: Kailang Yang <kailang@realtek.com> > > The new codec ALC255 needs its own set of verbs to enable > multifunction jacks. > > (Context and whitespace adjustments by David Henningsson) > > BugLink: https://bugs.launchpad.net/bugs/1248949 > Tested-by: Doro Wu <doro.wu@canonical.com> > Signed-off-by: David Henningsson <david.henningsson@canonical.com> > --- > sound/pci/hda/patch_realtek.c | 91 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 91 insertions(+) > > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > index daf7205..ceadd65 100644 > --- a/sound/pci/hda/patch_realtek.c > +++ b/sound/pci/hda/patch_realtek.c > @@ -588,6 +588,18 @@ static int alc_read_coef_idx(struct hda_codec *codec, > return val; > } > > +static int alc_read_coefex_idx(struct hda_codec *codec, > + hda_nid_t nid, > + unsigned int coef_idx) > +{ > + unsigned int val; > + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, > + coef_idx); > + val = snd_hda_codec_read(codec, nid, 0, > + AC_VERB_GET_PROC_COEF, 0); > + return val; > +} Rewrite alc_read_coef_idx() using this new function, too, e.g. #define alc_write_coef_idx(codec, idx, val) \ alc_read_coefex_idx(codec, 0x20, idx, val) > static void alc_write_coef_idx(struct hda_codec *codec, unsigned int coef_idx, > unsigned int coef_val) > { > @@ -597,6 +609,15 @@ static void alc_write_coef_idx(struct hda_codec *codec, unsigned int coef_idx, > coef_val); > } > > +static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, > + unsigned int coef_idx, unsigned int coef_val) > +{ > + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, > + coef_idx); > + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, > + coef_val); > +} Ditto. > + > /* a special bypass for COEF 0; read the cached value at the second time */ > static unsigned int alc_get_coef0(struct hda_codec *codec) > { > @@ -3109,6 +3130,14 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) > int val; > > switch (codec->vendor_id) { > + case 0x10ec0255: > + alc_write_coef_idx(codec, 0x1b, 0x0c0b); > + alc_write_coef_idx(codec, 0x45, 0xd089); > + val = alc_read_coefex_idx(codec, 0x57, 0x05); > + alc_write_coefex_idx(codec, 0x57, 0x05, val & ~(1<<14)); > + alc_write_coef_idx(codec, 0x06, 0x6104); > + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8aa6); Try to comment what these actually do. Not necessarily too detailed, but we need to have some ideas. I regret to have merged the former Realtek headset patches that have lots of such verbs without certain comments. thanks, Takashi ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ALSA: hda - Add multifunction jack support for ALC255 2013-11-07 13:22 ` Takashi Iwai @ 2013-11-07 13:32 ` David Henningsson 2013-11-08 5:48 ` Kailang 0 siblings, 1 reply; 8+ messages in thread From: David Henningsson @ 2013-11-07 13:32 UTC (permalink / raw) To: Takashi Iwai, kailang; +Cc: alsa-devel, 1248949 Hi, I can certainly rewrite coef_idx to use coefef_idx (I think that's a good idea), but for the comments, I know as little as you do about these verbs. Kailang, is it possible for you to add more comments to your patch so it can be applied upstream? Thanks, David On 11/07/2013 02:22 PM, Takashi Iwai wrote: > At Thu, 7 Nov 2013 14:08:41 +0100, > David Henningsson wrote: >> >> From: Kailang Yang <kailang@realtek.com> >> >> The new codec ALC255 needs its own set of verbs to enable >> multifunction jacks. >> >> (Context and whitespace adjustments by David Henningsson) >> >> BugLink: https://bugs.launchpad.net/bugs/1248949 >> Tested-by: Doro Wu <doro.wu@canonical.com> >> Signed-off-by: David Henningsson <david.henningsson@canonical.com> >> --- >> sound/pci/hda/patch_realtek.c | 91 +++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 91 insertions(+) >> >> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >> index daf7205..ceadd65 100644 >> --- a/sound/pci/hda/patch_realtek.c >> +++ b/sound/pci/hda/patch_realtek.c >> @@ -588,6 +588,18 @@ static int alc_read_coef_idx(struct hda_codec *codec, >> return val; >> } >> >> +static int alc_read_coefex_idx(struct hda_codec *codec, >> + hda_nid_t nid, >> + unsigned int coef_idx) >> +{ >> + unsigned int val; >> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, >> + coef_idx); >> + val = snd_hda_codec_read(codec, nid, 0, >> + AC_VERB_GET_PROC_COEF, 0); >> + return val; >> +} > > Rewrite alc_read_coef_idx() using this new function, too, e.g. > > #define alc_write_coef_idx(codec, idx, val) \ > alc_read_coefex_idx(codec, 0x20, idx, val) > >> static void alc_write_coef_idx(struct hda_codec *codec, unsigned int coef_idx, >> unsigned int coef_val) >> { >> @@ -597,6 +609,15 @@ static void alc_write_coef_idx(struct hda_codec *codec, unsigned int coef_idx, >> coef_val); >> } >> >> +static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, >> + unsigned int coef_idx, unsigned int coef_val) >> +{ >> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, >> + coef_idx); >> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, >> + coef_val); >> +} > > Ditto. > >> + >> /* a special bypass for COEF 0; read the cached value at the second time */ >> static unsigned int alc_get_coef0(struct hda_codec *codec) >> { >> @@ -3109,6 +3130,14 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) >> int val; >> >> switch (codec->vendor_id) { >> + case 0x10ec0255: >> + alc_write_coef_idx(codec, 0x1b, 0x0c0b); >> + alc_write_coef_idx(codec, 0x45, 0xd089); >> + val = alc_read_coefex_idx(codec, 0x57, 0x05); >> + alc_write_coefex_idx(codec, 0x57, 0x05, val & ~(1<<14)); >> + alc_write_coef_idx(codec, 0x06, 0x6104); >> + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8aa6); > > Try to comment what these actually do. Not necessarily too detailed, > but we need to have some ideas. > > I regret to have merged the former Realtek headset patches that have > lots of such verbs without certain comments. > > > thanks, > > Takashi > -- David Henningsson, Canonical Ltd. https://launchpad.net/~diwic ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ALSA: hda - Add multifunction jack support for ALC255 2013-11-07 13:32 ` David Henningsson @ 2013-11-08 5:48 ` Kailang 2013-11-08 5:55 ` David Henningsson 0 siblings, 1 reply; 8+ messages in thread From: Kailang @ 2013-11-08 5:48 UTC (permalink / raw) To: David Henningsson, Takashi Iwai; +Cc: alsa-devel, 1248949 Hi David, Could I add commemts for belowing context? Or I create new patch for it. BR, Kailang > Hi, > > I can certainly rewrite coef_idx to use coefef_idx (I think that's a > good idea), but for the comments, I know as little as you do about these > verbs. > > Kailang, is it possible for you to add more comments to your patch so it > can be applied upstream? > > Thanks, > David > > On 11/07/2013 02:22 PM, Takashi Iwai wrote: >> At Thu, 7 Nov 2013 14:08:41 +0100, >> David Henningsson wrote: >>> >>> From: Kailang Yang <kailang@realtek.com> >>> >>> The new codec ALC255 needs its own set of verbs to enable >>> multifunction jacks. >>> >>> (Context and whitespace adjustments by David Henningsson) >>> >>> BugLink: https://bugs.launchpad.net/bugs/1248949 >>> Tested-by: Doro Wu <doro.wu@canonical.com> >>> Signed-off-by: David Henningsson <david.henningsson@canonical.com> >>> --- >>> sound/pci/hda/patch_realtek.c | 91 >>> +++++++++++++++++++++++++++++++++++++++++ >>> 1 file changed, 91 insertions(+) >>> >>> diff --git a/sound/pci/hda/patch_realtek.c >>> b/sound/pci/hda/patch_realtek.c >>> index daf7205..ceadd65 100644 >>> --- a/sound/pci/hda/patch_realtek.c >>> +++ b/sound/pci/hda/patch_realtek.c >>> @@ -588,6 +588,18 @@ static int alc_read_coef_idx(struct hda_codec >>> *codec, >>> return val; >>> } >>> >>> +static int alc_read_coefex_idx(struct hda_codec *codec, >>> + hda_nid_t nid, >>> + unsigned int coef_idx) >>> +{ >>> + unsigned int val; >>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, >>> + coef_idx); >>> + val = snd_hda_codec_read(codec, nid, 0, >>> + AC_VERB_GET_PROC_COEF, 0); >>> + return val; >>> +} >> >> Rewrite alc_read_coef_idx() using this new function, too, e.g. >> >> #define alc_write_coef_idx(codec, idx, val) \ >> alc_read_coefex_idx(codec, 0x20, idx, val) >> >>> static void alc_write_coef_idx(struct hda_codec *codec, unsigned int >>> coef_idx, >>> unsigned int coef_val) >>> { >>> @@ -597,6 +609,15 @@ static void alc_write_coef_idx(struct hda_codec >>> *codec, unsigned int coef_idx, >>> coef_val); >>> } >>> >>> +static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t >>> nid, >>> + unsigned int coef_idx, unsigned int coef_val) >>> +{ >>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, >>> + coef_idx); >>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, >>> + coef_val); >>> +} >> >> Ditto. >> >>> + >>> /* a special bypass for COEF 0; read the cached value at the second >>> time */ >>> static unsigned int alc_get_coef0(struct hda_codec *codec) >>> { >>> @@ -3109,6 +3130,14 @@ static void alc_headset_mode_unplugged(struct >>> hda_codec *codec) >>> int val; >>> >>> switch (codec->vendor_id) { >>> + case 0x10ec0255: >>> + alc_write_coef_idx(codec, 0x1b, 0x0c0b); >>> + alc_write_coef_idx(codec, 0x45, 0xd089); >>> + val = alc_read_coefex_idx(codec, 0x57, 0x05); >>> + alc_write_coefex_idx(codec, 0x57, 0x05, val & ~(1<<14)); >>> + alc_write_coef_idx(codec, 0x06, 0x6104); >>> + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8aa6); >> >> Try to comment what these actually do. Not necessarily too detailed, >> but we need to have some ideas. >> >> I regret to have merged the former Realtek headset patches that have >> lots of such verbs without certain comments. >> >> >> thanks, >> >> Takashi >> > > > > -- > David Henningsson, Canonical Ltd. > https://launchpad.net/~diwic > > ------Please consider the environment before printing this e-mail. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ALSA: hda - Add multifunction jack support for ALC255 2013-11-08 5:48 ` Kailang @ 2013-11-08 5:55 ` David Henningsson 2013-11-08 8:19 ` Kailang 0 siblings, 1 reply; 8+ messages in thread From: David Henningsson @ 2013-11-08 5:55 UTC (permalink / raw) To: Kailang, Takashi Iwai; +Cc: alsa-devel, 1248949 Hi Kailang, It does not matter. Choose what works best for you and I'll sort it out before sending to Takashi. // David On 11/08/2013 06:48 AM, Kailang wrote: > Hi David, > > Could I add commemts for belowing context? > Or I create new patch for it. > > BR, > Kailang > >> Hi, >> >> I can certainly rewrite coef_idx to use coefef_idx (I think that's a >> good idea), but for the comments, I know as little as you do about these >> verbs. >> >> Kailang, is it possible for you to add more comments to your patch so it >> can be applied upstream? >> >> Thanks, >> David >> >> On 11/07/2013 02:22 PM, Takashi Iwai wrote: >>> At Thu, 7 Nov 2013 14:08:41 +0100, >>> David Henningsson wrote: >>>> >>>> From: Kailang Yang <kailang@realtek.com> >>>> >>>> The new codec ALC255 needs its own set of verbs to enable >>>> multifunction jacks. >>>> >>>> (Context and whitespace adjustments by David Henningsson) >>>> >>>> BugLink: https://bugs.launchpad.net/bugs/1248949 >>>> Tested-by: Doro Wu <doro.wu@canonical.com> >>>> Signed-off-by: David Henningsson <david.henningsson@canonical.com> >>>> --- >>>> sound/pci/hda/patch_realtek.c | 91 >>>> +++++++++++++++++++++++++++++++++++++++++ >>>> 1 file changed, 91 insertions(+) >>>> >>>> diff --git a/sound/pci/hda/patch_realtek.c >>>> b/sound/pci/hda/patch_realtek.c >>>> index daf7205..ceadd65 100644 >>>> --- a/sound/pci/hda/patch_realtek.c >>>> +++ b/sound/pci/hda/patch_realtek.c >>>> @@ -588,6 +588,18 @@ static int alc_read_coef_idx(struct hda_codec >>>> *codec, >>>> return val; >>>> } >>>> >>>> +static int alc_read_coefex_idx(struct hda_codec *codec, >>>> + hda_nid_t nid, >>>> + unsigned int coef_idx) >>>> +{ >>>> + unsigned int val; >>>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, >>>> + coef_idx); >>>> + val = snd_hda_codec_read(codec, nid, 0, >>>> + AC_VERB_GET_PROC_COEF, 0); >>>> + return val; >>>> +} >>> >>> Rewrite alc_read_coef_idx() using this new function, too, e.g. >>> >>> #define alc_write_coef_idx(codec, idx, val) \ >>> alc_read_coefex_idx(codec, 0x20, idx, val) >>> >>>> static void alc_write_coef_idx(struct hda_codec *codec, unsigned >>>> int coef_idx, >>>> unsigned int coef_val) >>>> { >>>> @@ -597,6 +609,15 @@ static void alc_write_coef_idx(struct hda_codec >>>> *codec, unsigned int coef_idx, >>>> coef_val); >>>> } >>>> >>>> +static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t >>>> nid, >>>> + unsigned int coef_idx, unsigned int coef_val) >>>> +{ >>>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, >>>> + coef_idx); >>>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, >>>> + coef_val); >>>> +} >>> >>> Ditto. >>> >>>> + >>>> /* a special bypass for COEF 0; read the cached value at the second >>>> time */ >>>> static unsigned int alc_get_coef0(struct hda_codec *codec) >>>> { >>>> @@ -3109,6 +3130,14 @@ static void alc_headset_mode_unplugged(struct >>>> hda_codec *codec) >>>> int val; >>>> >>>> switch (codec->vendor_id) { >>>> + case 0x10ec0255: >>>> + alc_write_coef_idx(codec, 0x1b, 0x0c0b); >>>> + alc_write_coef_idx(codec, 0x45, 0xd089); >>>> + val = alc_read_coefex_idx(codec, 0x57, 0x05); >>>> + alc_write_coefex_idx(codec, 0x57, 0x05, val & ~(1<<14)); >>>> + alc_write_coef_idx(codec, 0x06, 0x6104); >>>> + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8aa6); >>> >>> Try to comment what these actually do. Not necessarily too detailed, >>> but we need to have some ideas. >>> >>> I regret to have merged the former Realtek headset patches that have >>> lots of such verbs without certain comments. >>> >>> >>> thanks, >>> >>> Takashi >>> >> >> >> >> -- >> David Henningsson, Canonical Ltd. >> https://launchpad.net/~diwic >> >> ------Please consider the environment before printing this e-mail. > -- David Henningsson, Canonical Ltd. https://launchpad.net/~diwic ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ALSA: hda - Add multifunction jack support for ALC255 2013-11-08 5:55 ` David Henningsson @ 2013-11-08 8:19 ` Kailang 2013-11-08 10:10 ` David Henningsson 0 siblings, 1 reply; 8+ messages in thread From: Kailang @ 2013-11-08 8:19 UTC (permalink / raw) To: David Henningsson, Takashi Iwai; +Cc: alsa-devel, 1248949 [-- Attachment #1: Type: text/plain, Size: 4092 bytes --] Hi David, I modified as attach patch. It included coef_idx to use coefex_idx. BR, Kailang > Hi Kailang, > > It does not matter. Choose what works best for you and I'll sort it out > before sending to Takashi. > > // David > > On 11/08/2013 06:48 AM, Kailang wrote: >> Hi David, >> >> Could I add commemts for belowing context? >> Or I create new patch for it. >> >> BR, >> Kailang >> >>> Hi, >>> >>> I can certainly rewrite coef_idx to use coefef_idx (I think that's a >>> good idea), but for the comments, I know as little as you do about these >>> verbs. >>> >>> Kailang, is it possible for you to add more comments to your patch so it >>> can be applied upstream? >>> >>> Thanks, >>> David >>> >>> On 11/07/2013 02:22 PM, Takashi Iwai wrote: >>>> At Thu, 7 Nov 2013 14:08:41 +0100, >>>> David Henningsson wrote: >>>>> >>>>> From: Kailang Yang <kailang@realtek.com> >>>>> >>>>> The new codec ALC255 needs its own set of verbs to enable >>>>> multifunction jacks. >>>>> >>>>> (Context and whitespace adjustments by David Henningsson) >>>>> >>>>> BugLink: https://bugs.launchpad.net/bugs/1248949 >>>>> Tested-by: Doro Wu <doro.wu@canonical.com> >>>>> Signed-off-by: David Henningsson <david.henningsson@canonical.com> >>>>> --- >>>>> sound/pci/hda/patch_realtek.c | 91 >>>>> +++++++++++++++++++++++++++++++++++++++++ >>>>> 1 file changed, 91 insertions(+) >>>>> >>>>> diff --git a/sound/pci/hda/patch_realtek.c >>>>> b/sound/pci/hda/patch_realtek.c >>>>> index daf7205..ceadd65 100644 >>>>> --- a/sound/pci/hda/patch_realtek.c >>>>> +++ b/sound/pci/hda/patch_realtek.c >>>>> @@ -588,6 +588,18 @@ static int alc_read_coef_idx(struct hda_codec >>>>> *codec, >>>>> return val; >>>>> } >>>>> >>>>> +static int alc_read_coefex_idx(struct hda_codec *codec, >>>>> + hda_nid_t nid, >>>>> + unsigned int coef_idx) >>>>> +{ >>>>> + unsigned int val; >>>>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, >>>>> + coef_idx); >>>>> + val = snd_hda_codec_read(codec, nid, 0, >>>>> + AC_VERB_GET_PROC_COEF, 0); >>>>> + return val; >>>>> +} >>>> >>>> Rewrite alc_read_coef_idx() using this new function, too, e.g. >>>> >>>> #define alc_write_coef_idx(codec, idx, val) \ >>>> alc_read_coefex_idx(codec, 0x20, idx, val) >>>> >>>>> static void alc_write_coef_idx(struct hda_codec *codec, unsigned >>>>> int coef_idx, >>>>> unsigned int coef_val) >>>>> { >>>>> @@ -597,6 +609,15 @@ static void alc_write_coef_idx(struct hda_codec >>>>> *codec, unsigned int coef_idx, >>>>> coef_val); >>>>> } >>>>> >>>>> +static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t >>>>> nid, >>>>> + unsigned int coef_idx, unsigned int coef_val) >>>>> +{ >>>>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, >>>>> + coef_idx); >>>>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, >>>>> + coef_val); >>>>> +} >>>> >>>> Ditto. >>>> >>>>> + >>>>> /* a special bypass for COEF 0; read the cached value at the second >>>>> time */ >>>>> static unsigned int alc_get_coef0(struct hda_codec *codec) >>>>> { >>>>> @@ -3109,6 +3130,14 @@ static void alc_headset_mode_unplugged(struct >>>>> hda_codec *codec) >>>>> int val; >>>>> >>>>> switch (codec->vendor_id) { >>>>> + case 0x10ec0255: >>>>> + alc_write_coef_idx(codec, 0x1b, 0x0c0b); >>>>> + alc_write_coef_idx(codec, 0x45, 0xd089); >>>>> + val = alc_read_coefex_idx(codec, 0x57, 0x05); >>>>> + alc_write_coefex_idx(codec, 0x57, 0x05, val & ~(1<<14)); >>>>> + alc_write_coef_idx(codec, 0x06, 0x6104); >>>>> + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8aa6); >>>> >>>> Try to comment what these actually do. Not necessarily too detailed, >>>> but we need to have some ideas. >>>> >>>> I regret to have merged the former Realtek headset patches that have >>>> lots of such verbs without certain comments. >>>> >>>> >>>> thanks, >>>> >>>> Takashi >>>> >>> >>> >>> >>> -- >>> David Henningsson, Canonical Ltd. >>> https://launchpad.net/~diwic >>> >>> ------Please consider the environment before printing this e-mail. >> > > > > -- > David Henningsson, Canonical Ltd. > https://launchpad.net/~diwic [-- Attachment #2: 0002-alc255-uaj.patch --] [-- Type: application/octet-stream, Size: 7985 bytes --] >From 43e1947cdee4e63ed92cfff5e1d08dfa0b99eee4 Mon Sep 17 00:00:00 2001 From: Kailang Yang <kailang@realtek.com> Date: Fri, 8 Nov 2013 15:54:49 +0800 Subject: [PATCH] ALSA: hda/realtek - Add new codec ALC255/ALC3234 UAJ supported New codec ALC255/ALC3234 support multifunction jacks. It used for menual select the input device. 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 6a21466..4376c35 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -577,26 +577,35 @@ static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports) /* * COEF access helper functions */ -static int alc_read_coef_idx(struct hda_codec *codec, - unsigned int coef_idx) + +static int alc_read_coefex_idx(struct hda_codec *codec, + hda_nid_t nid, + unsigned int coef_idx) { unsigned int val; - snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); - val = snd_hda_codec_read(codec, 0x20, 0, + val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); return val; } -static void alc_write_coef_idx(struct hda_codec *codec, unsigned int coef_idx, +#define alc_read_coef_idx(codec, coef_idx) \ + alc_read_coefex_idx(codec, 0x20, coef_idx) + +static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, + unsigned int coef_idx, unsigned int coef_val) { - snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); - snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, coef_val); } +#define alc_write_coef_idx(codec, coef_idx, coef_val) \ + alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val) + /* a special bypass for COEF 0; read the cached value at the second time */ static unsigned int alc_get_coef0(struct hda_codec *codec) { @@ -3109,6 +3118,19 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) int val; switch (codec->vendor_id) { + case 0x10ec0255: + /* LDO and MISC control */ + alc_write_coef_idx(codec, 0x1b, 0x0c0b); + /* UAJ function set to menual mode */ + alc_write_coef_idx(codec, 0x45, 0xd089); + /* Direct Drive HP Amp control(Set to verb control)*/ + val = alc_read_coefex_idx(codec, 0x57, 0x05); + alc_write_coefex_idx(codec, 0x57, 0x05, val & ~(1<<14)); + /* Set MIC2 Vref gate with HP */ + alc_write_coef_idx(codec, 0x06, 0x6104); + /* Direct Drive HP Amp control */ + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8aa6); + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x1b, 0x0c0b); alc_write_coef_idx(codec, 0x45, 0xc429); @@ -3140,6 +3162,14 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, int val; switch (codec->vendor_id) { + case 0x10ec0255: + alc_write_coef_idx(codec, 0x45, 0xc489); + snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8aa6); + /* Set MIC2 Vref gate to normal */ + alc_write_coef_idx(codec, 0x06, 0x6100); + snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x45, 0xc429); snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); @@ -3171,6 +3201,12 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, static void alc_headset_mode_default(struct hda_codec *codec) { switch (codec->vendor_id) { + case 0x10ec0255: + alc_write_coef_idx(codec, 0x45, 0xc089); + alc_write_coef_idx(codec, 0x45, 0xc489); + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8ea6); + alc_write_coef_idx(codec, 0x49, 0x0049); + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x06, 0x2100); alc_write_coef_idx(codec, 0x32, 0x4ea3); @@ -3194,6 +3230,12 @@ static void alc_headset_mode_default(struct hda_codec *codec) static void alc_headset_mode_ctia(struct hda_codec *codec) { switch (codec->vendor_id) { + case 0x10ec0255: + /* Set to CTIA type */ + alc_write_coef_idx(codec, 0x45, 0xd489); + alc_write_coef_idx(codec, 0x1b, 0x0c2b); + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8ea6); + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x45, 0xd429); alc_write_coef_idx(codec, 0x1b, 0x0c2b); @@ -3216,6 +3258,12 @@ static void alc_headset_mode_ctia(struct hda_codec *codec) static void alc_headset_mode_omtp(struct hda_codec *codec) { switch (codec->vendor_id) { + case 0x10ec0255: + /* Set to OMTP Type */ + alc_write_coef_idx(codec, 0x45, 0xe489); + alc_write_coef_idx(codec, 0x1b, 0x0c2b); + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8ea6); + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x45, 0xe429); alc_write_coef_idx(codec, 0x1b, 0x0c2b); @@ -3241,6 +3289,15 @@ static void alc_determine_headset_type(struct hda_codec *codec) struct alc_spec *spec = codec->spec; switch (codec->vendor_id) { + case 0x10ec0255: + /* combo jack auto switch control(Check type)*/ + alc_write_coef_idx(codec, 0x45, 0xd089); + /* combo jack auto switch control(Vref conteol) */ + alc_write_coef_idx(codec, 0x49, 0x0149); + msleep(300); + val = alc_read_coef_idx(codec, 0x46); + is_ctia = (val & 0x0070) == 0x0070; + break; case 0x10ec0283: alc_write_coef_idx(codec, 0x45, 0xd029); msleep(300); @@ -3387,6 +3444,21 @@ static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, alc_fixup_headset_mode(codec, fix, action); } +static void alc_fixup_headset_mode_alc255(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + if (action == HDA_FIXUP_ACT_PRE_PROBE) { + /* Set to iphone type */ + alc_write_coef_idx(codec, 0x1b, 0x880b); + alc_write_coef_idx(codec, 0x45, 0xd089); + alc_write_coef_idx(codec, 0x1b, 0x080b); + alc_write_coef_idx(codec, 0x46, 0x0004); + alc_write_coef_idx(codec, 0x1b, 0x0c0b); + msleep(30); + } + alc_fixup_headset_mode(codec, fix, action); +} + static void alc_fixup_headset_mode_alc668(struct hda_codec *codec, const struct hda_fixup *fix, int action) { @@ -3688,6 +3760,8 @@ enum { ALC283_FIXUP_INT_MIC, ALC290_FIXUP_MONO_SPEAKERS, ALC269_FIXUP_THINKPAD_ACPI, + ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, + ALC255_FIXUP_HEADSET_MODE, }; static const struct hda_fixup alc269_fixups[] = { @@ -3997,6 +4071,20 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST }, + [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ + { 0x1a, 0x01a1913d }, /* use as headphone mic, without its own jack detect */ + { } + }, + .chained = true, + .chain_id = ALC255_FIXUP_HEADSET_MODE + }, + [ALC255_FIXUP_HEADSET_MODE] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_headset_mode_alc255, + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -4039,6 +4127,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), + SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), [-- Attachment #3: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] ALSA: hda - Add multifunction jack support for ALC255 2013-11-08 8:19 ` Kailang @ 2013-11-08 10:10 ` David Henningsson 2013-11-08 13:01 ` Takashi Iwai 0 siblings, 1 reply; 8+ messages in thread From: David Henningsson @ 2013-11-08 10:10 UTC (permalink / raw) To: Kailang, Takashi Iwai; +Cc: alsa-devel, 1248949 On 11/08/2013 09:19 AM, Kailang wrote: > Hi David, > > I modified as attach patch. > It included coef_idx to use coefex_idx. > > BR, > Kailang Thanks! @Takashi, does this new patch look good enough for you? > > >> Hi Kailang, >> >> It does not matter. Choose what works best for you and I'll sort it out >> before sending to Takashi. >> >> // David >> >> On 11/08/2013 06:48 AM, Kailang wrote: >>> Hi David, >>> >>> Could I add commemts for belowing context? >>> Or I create new patch for it. >>> >>> BR, >>> Kailang >>> >>>> Hi, >>>> >>>> I can certainly rewrite coef_idx to use coefef_idx (I think that's a >>>> good idea), but for the comments, I know as little as you do about >>>> these >>>> verbs. >>>> >>>> Kailang, is it possible for you to add more comments to your patch >>>> so it >>>> can be applied upstream? >>>> >>>> Thanks, >>>> David >>>> >>>> On 11/07/2013 02:22 PM, Takashi Iwai wrote: >>>>> At Thu, 7 Nov 2013 14:08:41 +0100, >>>>> David Henningsson wrote: >>>>>> >>>>>> From: Kailang Yang <kailang@realtek.com> >>>>>> >>>>>> The new codec ALC255 needs its own set of verbs to enable >>>>>> multifunction jacks. >>>>>> >>>>>> (Context and whitespace adjustments by David Henningsson) >>>>>> >>>>>> BugLink: https://bugs.launchpad.net/bugs/1248949 >>>>>> Tested-by: Doro Wu <doro.wu@canonical.com> >>>>>> Signed-off-by: David Henningsson <david.henningsson@canonical.com> >>>>>> --- >>>>>> sound/pci/hda/patch_realtek.c | 91 >>>>>> +++++++++++++++++++++++++++++++++++++++++ >>>>>> 1 file changed, 91 insertions(+) >>>>>> >>>>>> diff --git a/sound/pci/hda/patch_realtek.c >>>>>> b/sound/pci/hda/patch_realtek.c >>>>>> index daf7205..ceadd65 100644 >>>>>> --- a/sound/pci/hda/patch_realtek.c >>>>>> +++ b/sound/pci/hda/patch_realtek.c >>>>>> @@ -588,6 +588,18 @@ static int alc_read_coef_idx(struct hda_codec >>>>>> *codec, >>>>>> return val; >>>>>> } >>>>>> >>>>>> +static int alc_read_coefex_idx(struct hda_codec *codec, >>>>>> + hda_nid_t nid, >>>>>> + unsigned int coef_idx) >>>>>> +{ >>>>>> + unsigned int val; >>>>>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, >>>>>> + coef_idx); >>>>>> + val = snd_hda_codec_read(codec, nid, 0, >>>>>> + AC_VERB_GET_PROC_COEF, 0); >>>>>> + return val; >>>>>> +} >>>>> >>>>> Rewrite alc_read_coef_idx() using this new function, too, e.g. >>>>> >>>>> #define alc_write_coef_idx(codec, idx, val) \ >>>>> alc_read_coefex_idx(codec, 0x20, idx, val) >>>>> >>>>>> static void alc_write_coef_idx(struct hda_codec *codec, unsigned >>>>>> int coef_idx, >>>>>> unsigned int coef_val) >>>>>> { >>>>>> @@ -597,6 +609,15 @@ static void alc_write_coef_idx(struct hda_codec >>>>>> *codec, unsigned int coef_idx, >>>>>> coef_val); >>>>>> } >>>>>> >>>>>> +static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t >>>>>> nid, >>>>>> + unsigned int coef_idx, unsigned int coef_val) >>>>>> +{ >>>>>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, >>>>>> + coef_idx); >>>>>> + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, >>>>>> + coef_val); >>>>>> +} >>>>> >>>>> Ditto. >>>>> >>>>>> + >>>>>> /* a special bypass for COEF 0; read the cached value at the second >>>>>> time */ >>>>>> static unsigned int alc_get_coef0(struct hda_codec *codec) >>>>>> { >>>>>> @@ -3109,6 +3130,14 @@ static void alc_headset_mode_unplugged(struct >>>>>> hda_codec *codec) >>>>>> int val; >>>>>> >>>>>> switch (codec->vendor_id) { >>>>>> + case 0x10ec0255: >>>>>> + alc_write_coef_idx(codec, 0x1b, 0x0c0b); >>>>>> + alc_write_coef_idx(codec, 0x45, 0xd089); >>>>>> + val = alc_read_coefex_idx(codec, 0x57, 0x05); >>>>>> + alc_write_coefex_idx(codec, 0x57, 0x05, val & ~(1<<14)); >>>>>> + alc_write_coef_idx(codec, 0x06, 0x6104); >>>>>> + alc_write_coefex_idx(codec, 0x57, 0x03, 0x8aa6); >>>>> >>>>> Try to comment what these actually do. Not necessarily too detailed, >>>>> but we need to have some ideas. >>>>> >>>>> I regret to have merged the former Realtek headset patches that have >>>>> lots of such verbs without certain comments. >>>>> >>>>> >>>>> thanks, >>>>> >>>>> Takashi >>>>> >>>> >>>> >>>> >>>> -- >>>> David Henningsson, Canonical Ltd. >>>> https://launchpad.net/~diwic >>>> >>>> ------Please consider the environment before printing this e-mail. >>> >> >> >> >> -- >> David Henningsson, Canonical Ltd. >> https://launchpad.net/~diwic -- David Henningsson, Canonical Ltd. https://launchpad.net/~diwic ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ALSA: hda - Add multifunction jack support for ALC255 2013-11-08 10:10 ` David Henningsson @ 2013-11-08 13:01 ` Takashi Iwai 0 siblings, 0 replies; 8+ messages in thread From: Takashi Iwai @ 2013-11-08 13:01 UTC (permalink / raw) To: David Henningsson; +Cc: 1248949, alsa-devel, Kailang At Fri, 08 Nov 2013 11:10:48 +0100, David Henningsson wrote: > > On 11/08/2013 09:19 AM, Kailang wrote: > > Hi David, > > > > I modified as attach patch. > > It included coef_idx to use coefex_idx. > > > > BR, > > Kailang > > Thanks! > > @Takashi, does this new patch look good enough for you? Yes, I applied it now (although more comments wouldn't be bad :) Thanks. Takashi ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-11-08 13:01 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-11-07 13:08 [PATCH] ALSA: hda - Add multifunction jack support for ALC255 David Henningsson 2013-11-07 13:22 ` Takashi Iwai 2013-11-07 13:32 ` David Henningsson 2013-11-08 5:48 ` Kailang 2013-11-08 5:55 ` David Henningsson 2013-11-08 8:19 ` Kailang 2013-11-08 10:10 ` David Henningsson 2013-11-08 13:01 ` 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.