Skip to content

Commit

Permalink
ALSA: hda/ca0132 - Actually fix microphone issue
Browse files Browse the repository at this point in the history
This patch fixes the microphone issue for all cards. The previous fix
worked on the ZxR, but not on the AE-5 or Z. This patch has been tested
to work for all cards.

Signed-off-by: Connor McAdams <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Conmanx360 authored and tiwai committed Oct 21, 2018
1 parent eb7ebfa commit b5a2293
Showing 1 changed file with 37 additions and 36 deletions.
73 changes: 37 additions & 36 deletions sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -6983,37 +6983,44 @@ static void sbz_chipio_startup_data(struct hda_codec *codec)
static void ca0132_alt_dsp_scp_startup(struct hda_codec *codec)
{
struct ca0132_spec *spec = codec->spec;
unsigned int tmp;
unsigned int tmp, i;

switch (spec->quirk) {
case QUIRK_SBZ:
case QUIRK_AE5:
tmp = 0x00000003;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
tmp = 0x00000000;
dspio_set_uint_param_no_source(codec, 0x80, 0x0A, tmp);
tmp = 0x00000001;
dspio_set_uint_param_no_source(codec, 0x80, 0x0B, tmp);
tmp = 0x00000004;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
tmp = 0x00000005;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
tmp = 0x00000000;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
break;
case QUIRK_R3D:
case QUIRK_R3DI:
tmp = 0x00000000;
dspio_set_uint_param_no_source(codec, 0x80, 0x0A, tmp);
tmp = 0x00000001;
dspio_set_uint_param_no_source(codec, 0x80, 0x0B, tmp);
tmp = 0x00000004;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
tmp = 0x00000005;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
tmp = 0x00000000;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
break;
/*
* Gotta run these twice, or else mic works inconsistently. Not clear
* why this is, but multiple tests have confirmed it.
*/
for (i = 0; i < 2; i++) {
switch (spec->quirk) {
case QUIRK_SBZ:
case QUIRK_AE5:
tmp = 0x00000003;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
tmp = 0x00000000;
dspio_set_uint_param_no_source(codec, 0x80, 0x0A, tmp);
tmp = 0x00000001;
dspio_set_uint_param_no_source(codec, 0x80, 0x0B, tmp);
tmp = 0x00000004;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
tmp = 0x00000005;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
tmp = 0x00000000;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
break;
case QUIRK_R3D:
case QUIRK_R3DI:
tmp = 0x00000000;
dspio_set_uint_param_no_source(codec, 0x80, 0x0A, tmp);
tmp = 0x00000001;
dspio_set_uint_param_no_source(codec, 0x80, 0x0B, tmp);
tmp = 0x00000004;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
tmp = 0x00000005;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
tmp = 0x00000000;
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
break;
}
msleep(100);
}
}

Expand Down Expand Up @@ -7246,8 +7253,6 @@ static void r3d_setup_defaults(struct hda_codec *codec)
int num_fx;
int idx, i;

msleep(100);

if (spec->dsp_state != DSP_DOWNLOADED)
return;

Expand Down Expand Up @@ -7292,8 +7297,6 @@ static void sbz_setup_defaults(struct hda_codec *codec)
int num_fx;
int idx, i;

msleep(100);

if (spec->dsp_state != DSP_DOWNLOADED)
return;

Expand Down Expand Up @@ -7351,8 +7354,6 @@ static void ae5_setup_defaults(struct hda_codec *codec)
int num_fx;
int idx, i;

msleep(100);

if (spec->dsp_state != DSP_DOWNLOADED)
return;

Expand Down

0 comments on commit b5a2293

Please sign in to comment.