[alsa-devel] [PATCH] ALSA: hda - Add mic fixup for Gigabyte BXBT-2807
The Gigabyte BRIX BXBT-2707 is a mini-PC with Realtek ALC283 HDA, exposing a single headset jack.
However, the default pin config information only suggests that one pin is connected: a HP out jack (pin 0x21, default config 0x04211010).
The microphone input is behind pin 0x19, which has default config 0x411111f0 (i.e. unused), so it does not show up in userspace, and no microphone input is possible via the headset.
Override the pin config so that the headset mic can be used.
Signed-off-by: Daniel Drake drake@endlessm.com --- sound/pci/hda/patch_realtek.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 512582b..10f1848 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4358,6 +4358,7 @@ enum { ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC, ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, ALC292_FIXUP_TPT440_DOCK, + ALC283_FIXUP_BXBT2807_MIC, };
static const struct hda_fixup alc269_fixups[] = { @@ -4792,6 +4793,13 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST }, + [ALC283_FIXUP_BXBT2807_MIC] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { + { 0x19, 0x04a110f0 }, + { }, + }, + }, };
static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -5013,6 +5021,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ + SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC),
#if 0 /* Below is a quirk table taken from the old code.
At Tue, 22 Jul 2014 10:58:29 +0100, Daniel Drake wrote:
The Gigabyte BRIX BXBT-2707 is a mini-PC with Realtek ALC283 HDA, exposing a single headset jack.
However, the default pin config information only suggests that one pin is connected: a HP out jack (pin 0x21, default config 0x04211010).
The microphone input is behind pin 0x19, which has default config 0x411111f0 (i.e. unused), so it does not show up in userspace, and no microphone input is possible via the headset.
Override the pin config so that the headset mic can be used.
The overwritten value looks like the jack-detectable. Is it really so? Many headset jacks don't give the jack detection in the mic pin but relies on the headphone pin jack detection or use vendor-specific way.
thanks,
Takashi
Signed-off-by: Daniel Drake drake@endlessm.com
sound/pci/hda/patch_realtek.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 512582b..10f1848 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4358,6 +4358,7 @@ enum { ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC, ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, ALC292_FIXUP_TPT440_DOCK,
- ALC283_FIXUP_BXBT2807_MIC,
};
static const struct hda_fixup alc269_fixups[] = { @@ -4792,6 +4793,13 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST },
- [ALC283_FIXUP_BXBT2807_MIC] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
{ 0x19, 0x04a110f0 },
{ },
},
- },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -5013,6 +5021,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
- SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC),
#if 0 /* Below is a quirk table taken from the old code. -- 1.9.1
On Tue, Jul 22, 2014 at 11:27 AM, Takashi Iwai tiwai@suse.de wrote:
The overwritten value looks like the jack-detectable. Is it really so? Many headset jacks don't give the jack detection in the mic pin but relies on the headphone pin jack detection or use vendor-specific way.
"hda-jack-sense-test -a" correctly shows the mic as present when the headset is connected, and shows "Not present" when nothing is connected, or when speakers are connected. Is this enough to confirm that jack sense is working?
Thank Daniel
At Tue, 22 Jul 2014 11:29:51 +0100, Daniel Drake wrote:
On Tue, Jul 22, 2014 at 11:27 AM, Takashi Iwai tiwai@suse.de wrote:
The overwritten value looks like the jack-detectable. Is it really so? Many headset jacks don't give the jack detection in the mic pin but relies on the headphone pin jack detection or use vendor-specific way.
"hda-jack-sense-test -a" correctly shows the mic as present when the headset is connected, and shows "Not present" when nothing is connected, or when speakers are connected. Is this enough to confirm that jack sense is working?
What if connecting a headphone jack instead of a headset?
Does the device have another mic (internal mic or whatever)? The mis-detection of mic jack won't be a big problem if there is a single mic input, but if there are two, the driver may switch automatically per jack status, thus it becomes a real problem.
Takashi
On Tue, Jul 22, 2014 at 11:37 AM, Takashi Iwai tiwai@suse.de wrote:
What if connecting a headphone jack instead of a headset?
Does the device have another mic (internal mic or whatever)? The mis-detection of mic jack won't be a big problem if there is a single mic input, but if there are two, the driver may switch automatically per jack status, thus it becomes a real problem.
Thanks for checking through this.
The only audio capabilities of this mini-PC are the headset jack (via ALC283 codec), and audio output over HDMI (which appears as another codec under HDA architecture). There is no internal mic nor internal speakers.
When nothing is connected: Pin 0x19 (Not connected): present = No Pin 0x21 (Black HP Out): present = No
When a headset is connected: Pin 0x19 (Not connected): present = Yes Pin 0x21 (Black HP Out): present = Yes
When speakers/simple headphones are connected (no mic): Pin 0x19 (Not connected): present = No Pin 0x21 (Black HP Out): present = Yes
In the above output I excluded the other pins which are all "Not connected" and always seem to have "present = No".
Daniel
At Tue, 22 Jul 2014 11:42:58 +0100, Daniel Drake wrote:
On Tue, Jul 22, 2014 at 11:37 AM, Takashi Iwai tiwai@suse.de wrote:
What if connecting a headphone jack instead of a headset?
Does the device have another mic (internal mic or whatever)? The mis-detection of mic jack won't be a big problem if there is a single mic input, but if there are two, the driver may switch automatically per jack status, thus it becomes a real problem.
Thanks for checking through this.
The only audio capabilities of this mini-PC are the headset jack (via ALC283 codec), and audio output over HDMI (which appears as another codec under HDA architecture). There is no internal mic nor internal speakers.
When nothing is connected: Pin 0x19 (Not connected): present = No Pin 0x21 (Black HP Out): present = No
When a headset is connected: Pin 0x19 (Not connected): present = Yes Pin 0x21 (Black HP Out): present = Yes
When speakers/simple headphones are connected (no mic): Pin 0x19 (Not connected): present = No Pin 0x21 (Black HP Out): present = Yes
In the above output I excluded the other pins which are all "Not connected" and always seem to have "present = No".
OK, the jack-detection on the mic pin is really functional. I applied your patch now (with the rearrangement of the fixup position in the order). Thanks.
Takashi
participants (2)
-
Daniel Drake
-
Takashi Iwai