Skip to content

Commit

Permalink
ALSA: hda/ca0132 - Add AE-7 microphone selection commands.
Browse files Browse the repository at this point in the history
Add AE-7 quirk data for setting of microphone. The AE-7 has no front
panel connector, so only rear-mic/line-in have new commands.

Signed-off-by: Connor McAdams <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Conmanx360 authored and tiwai committed Aug 26, 2020
1 parent 91b94a9 commit ed93f97
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -4997,6 +4997,15 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
ca0113_mmio_command_set(codec, 0x30, 0x28, 0x00);
tmp = FLOAT_THREE;
break;
case QUIRK_AE7:
ca0113_mmio_command_set(codec, 0x30, 0x28, 0x00);
tmp = FLOAT_THREE;
chipio_set_conn_rate(codec, MEM_CONNID_MICIN2,
SR_96_000);
chipio_set_conn_rate(codec, MEM_CONNID_MICOUT2,
SR_96_000);
dspio_set_uint_param(codec, 0x80, 0x01, FLOAT_ZERO);
break;
default:
tmp = FLOAT_ONE;
break;
Expand Down Expand Up @@ -5042,6 +5051,14 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
case QUIRK_AE5:
ca0113_mmio_command_set(codec, 0x30, 0x28, 0x00);
break;
case QUIRK_AE7:
ca0113_mmio_command_set(codec, 0x30, 0x28, 0x3f);
chipio_set_conn_rate(codec, MEM_CONNID_MICIN2,
SR_96_000);
chipio_set_conn_rate(codec, MEM_CONNID_MICOUT2,
SR_96_000);
dspio_set_uint_param(codec, 0x80, 0x01, FLOAT_ZERO);
break;
default:
break;
}
Expand All @@ -5051,7 +5068,10 @@ static int ca0132_alt_select_in(struct hda_codec *codec)
if (ca0132_quirk(spec) == QUIRK_R3DI)
chipio_set_conn_rate(codec, 0x0F, SR_96_000);

tmp = FLOAT_ZERO;
if (ca0132_quirk(spec) == QUIRK_AE7)
tmp = FLOAT_THREE;
else
tmp = FLOAT_ZERO;
dspio_set_uint_param(codec, 0x80, 0x00, tmp);

switch (ca0132_quirk(spec)) {
Expand Down

0 comments on commit ed93f97

Please sign in to comment.