public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek - change the location for one of two front microphones
@ 2017-07-07  4:08 Hui Wang
  2017-07-07  6:11 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Hui Wang @ 2017-07-07  4:08 UTC (permalink / raw)
  To: tiwai, alsa-devel; +Cc: stable

On this Lenovo machine, there are two front mics, and both of them are
assigned the same name "Mic", but pulseaudio can't support two mics
with the same name, as a workaround, we change the location for one of
them, then the driver will assign "Front Mic" and "Mic" for them.

Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
 sound/pci/hda/patch_realtek.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index cebf59e..a6c3ce0 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5179,6 +5179,7 @@ enum {
 	ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
 	ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
 	ALC233_FIXUP_LENOVO_MULTI_CODECS,
+	ALC294_FIXUP_LENOVO_MIC_LOCATION,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -5962,6 +5963,18 @@ enum {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc233_alc662_fixup_lenovo_dual_codecs,
 	},
+	[ALC294_FIXUP_LENOVO_MIC_LOCATION] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			/* Change the mic location from front to right, otherwise there are
+			   two front mics with the same name, pulseaudio can't handle them.
+			   This is just a temporary workaround, after applying this fixup,
+			   there will be one "Front Mic" and one "Mic" in this machine.
+			 */
+			{ 0x1a, 0x04a19040 },
+			{ }
+		},
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6143,6 +6156,7 @@ enum {
 	SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460),
 	SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
 	SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
+	SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
 	SND_PCI_QUIRK(0x17aa, 0x3112, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
 	SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
 	SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
-- 
1.9.1

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

* Re: [PATCH] ALSA: hda/realtek - change the location for one of two front microphones
  2017-07-07  4:08 [PATCH] ALSA: hda/realtek - change the location for one of two front microphones Hui Wang
@ 2017-07-07  6:11 ` Takashi Iwai
  2017-07-07  7:29   ` Hui Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2017-07-07  6:11 UTC (permalink / raw)
  To: Hui Wang; +Cc: alsa-devel, stable

On Fri, 07 Jul 2017 06:08:29 +0200,
Hui Wang wrote:
> 
> On this Lenovo machine, there are two front mics, and both of them are
> assigned the same name "Mic", but pulseaudio can't support two mics
> with the same name, as a workaround, we change the location for one of
> them, then the driver will assign "Front Mic" and "Mic" for them.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Hui Wang <hui.wang@canonical.com>
> ---
>  sound/pci/hda/patch_realtek.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index cebf59e..a6c3ce0 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -5179,6 +5179,7 @@ enum {
>  	ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
>  	ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
>  	ALC233_FIXUP_LENOVO_MULTI_CODECS,
> +	ALC294_FIXUP_LENOVO_MIC_LOCATION,
>  };
>  
>  static const struct hda_fixup alc269_fixups[] = {
> @@ -5962,6 +5963,18 @@ enum {
>  		.type = HDA_FIXUP_FUNC,
>  		.v.func = alc233_alc662_fixup_lenovo_dual_codecs,
>  	},
> +	[ALC294_FIXUP_LENOVO_MIC_LOCATION] = {
> +		.type = HDA_FIXUP_PINS,
> +		.v.pins = (const struct hda_pintbl[]) {
> +			/* Change the mic location from front to right, otherwise there are
> +			   two front mics with the same name, pulseaudio can't handle them.
> +			   This is just a temporary workaround, after applying this fixup,
> +			   there will be one "Front Mic" and one "Mic" in this machine.
> +			 */
> +			{ 0x1a, 0x04a19040 },
> +			{ }
> +		},
> +	},

Doesn't this Lenovo device need other quirks like hotkey?
Just to be sure.


thanks,

Takashi

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

* Re: [PATCH] ALSA: hda/realtek - change the location for one of two front microphones
  2017-07-07  6:11 ` Takashi Iwai
@ 2017-07-07  7:29   ` Hui Wang
  2017-07-07  7:31     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Hui Wang @ 2017-07-07  7:29 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, stable

On 07/07/2017 02:11 PM, Takashi Iwai wrote:
> On Fri, 07 Jul 2017 06:08:29 +0200,
> Hui Wang wrote:
>> On this Lenovo machine, there are two front mics, and both of them are
>> assigned the same name "Mic", but pulseaudio can't support two mics
>> with the same name, as a workaround, we change the location for one of
>> them, then the driver will assign "Front Mic" and "Mic" for them.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Hui Wang <hui.wang@canonical.com>
>> ---
>>   sound/pci/hda/patch_realtek.c | 14 ++++++++++++++
>>   1 file changed, 14 insertions(+)
>>
>> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
>> index cebf59e..a6c3ce0 100644
>> --- a/sound/pci/hda/patch_realtek.c
>> +++ b/sound/pci/hda/patch_realtek.c
>> @@ -5179,6 +5179,7 @@ enum {
>>   	ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
>>   	ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
>>   	ALC233_FIXUP_LENOVO_MULTI_CODECS,
>> +	ALC294_FIXUP_LENOVO_MIC_LOCATION,
>>   };
>>   
>>   static const struct hda_fixup alc269_fixups[] = {
>> @@ -5962,6 +5963,18 @@ enum {
>>   		.type = HDA_FIXUP_FUNC,
>>   		.v.func = alc233_alc662_fixup_lenovo_dual_codecs,
>>   	},
>> +	[ALC294_FIXUP_LENOVO_MIC_LOCATION] = {
>> +		.type = HDA_FIXUP_PINS,
>> +		.v.pins = (const struct hda_pintbl[]) {
>> +			/* Change the mic location from front to right, otherwise there are
>> +			   two front mics with the same name, pulseaudio can't handle them.
>> +			   This is just a temporary workaround, after applying this fixup,
>> +			   there will be one "Front Mic" and one "Mic" in this machine.
>> +			 */
>> +			{ 0x1a, 0x04a19040 },
>> +			{ }
>> +		},
>> +	},
> Doesn't this Lenovo device need other quirks like hotkey?
> Just to be sure.
So far, we don't meet hotkey issues on this machine.  And this machine 
is not a laptop, here is the picture of this machine: 
http://www3.lenovo.com/us/en/workstations-thinkstation-p-series/thinkstation-p-series-tiny-/ThinkStation-P320-Tiny/p/33TS3TP320T


Cheers,
Hui.
> thanks,
>
> Takashi
>

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

* Re: [PATCH] ALSA: hda/realtek - change the location for one of two front microphones
  2017-07-07  7:29   ` Hui Wang
@ 2017-07-07  7:31     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2017-07-07  7:31 UTC (permalink / raw)
  To: Hui Wang; +Cc: alsa-devel, stable

On Fri, 07 Jul 2017 09:29:25 +0200,
Hui Wang wrote:
> 
> On 07/07/2017 02:11 PM, Takashi Iwai wrote:
> > On Fri, 07 Jul 2017 06:08:29 +0200,
> > Hui Wang wrote:
> >> On this Lenovo machine, there are two front mics, and both of them are
> >> assigned the same name "Mic", but pulseaudio can't support two mics
> >> with the same name, as a workaround, we change the location for one of
> >> them, then the driver will assign "Front Mic" and "Mic" for them.
> >>
> >> Cc: stable@vger.kernel.org
> >> Signed-off-by: Hui Wang <hui.wang@canonical.com>
> >> ---
> >>   sound/pci/hda/patch_realtek.c | 14 ++++++++++++++
> >>   1 file changed, 14 insertions(+)
> >>
> >> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> >> index cebf59e..a6c3ce0 100644
> >> --- a/sound/pci/hda/patch_realtek.c
> >> +++ b/sound/pci/hda/patch_realtek.c
> >> @@ -5179,6 +5179,7 @@ enum {
> >>   	ALC233_FIXUP_ASUS_MIC_NO_PRESENCE,
> >>   	ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE,
> >>   	ALC233_FIXUP_LENOVO_MULTI_CODECS,
> >> +	ALC294_FIXUP_LENOVO_MIC_LOCATION,
> >>   };
> >>     static const struct hda_fixup alc269_fixups[] = {
> >> @@ -5962,6 +5963,18 @@ enum {
> >>   		.type = HDA_FIXUP_FUNC,
> >>   		.v.func = alc233_alc662_fixup_lenovo_dual_codecs,
> >>   	},
> >> +	[ALC294_FIXUP_LENOVO_MIC_LOCATION] = {
> >> +		.type = HDA_FIXUP_PINS,
> >> +		.v.pins = (const struct hda_pintbl[]) {
> >> +			/* Change the mic location from front to right, otherwise there are
> >> +			   two front mics with the same name, pulseaudio can't handle them.
> >> +			   This is just a temporary workaround, after applying this fixup,
> >> +			   there will be one "Front Mic" and one "Mic" in this machine.
> >> +			 */
> >> +			{ 0x1a, 0x04a19040 },
> >> +			{ }
> >> +		},
> >> +	},
> > Doesn't this Lenovo device need other quirks like hotkey?
> > Just to be sure.
> So far, we don't meet hotkey issues on this machine.  And this machine
> is not a laptop, here is the picture of this machine:
> http://www3.lenovo.com/us/en/workstations-thinkstation-p-series/thinkstation-p-series-tiny-/ThinkStation-P320-Tiny/p/33TS3TP320T

OK, then I'll apply as is.


thanks,

Takashi

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

end of thread, other threads:[~2017-07-07  7:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-07  4:08 [PATCH] ALSA: hda/realtek - change the location for one of two front microphones Hui Wang
2017-07-07  6:11 ` Takashi Iwai
2017-07-07  7:29   ` Hui Wang
2017-07-07  7:31     ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox