Skip to content

Commit b5a2293

Browse files
Conmanx360tiwai
authored andcommitted
ALSA: hda/ca0132 - Actually fix microphone issue
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 <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent eb7ebfa commit b5a2293

File tree

1 file changed

+37
-36
lines changed

1 file changed

+37
-36
lines changed

sound/pci/hda/patch_ca0132.c

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6983,37 +6983,44 @@ static void sbz_chipio_startup_data(struct hda_codec *codec)
69836983
static void ca0132_alt_dsp_scp_startup(struct hda_codec *codec)
69846984
{
69856985
struct ca0132_spec *spec = codec->spec;
6986-
unsigned int tmp;
6986+
unsigned int tmp, i;
69876987

6988-
switch (spec->quirk) {
6989-
case QUIRK_SBZ:
6990-
case QUIRK_AE5:
6991-
tmp = 0x00000003;
6992-
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
6993-
tmp = 0x00000000;
6994-
dspio_set_uint_param_no_source(codec, 0x80, 0x0A, tmp);
6995-
tmp = 0x00000001;
6996-
dspio_set_uint_param_no_source(codec, 0x80, 0x0B, tmp);
6997-
tmp = 0x00000004;
6998-
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
6999-
tmp = 0x00000005;
7000-
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7001-
tmp = 0x00000000;
7002-
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7003-
break;
7004-
case QUIRK_R3D:
7005-
case QUIRK_R3DI:
7006-
tmp = 0x00000000;
7007-
dspio_set_uint_param_no_source(codec, 0x80, 0x0A, tmp);
7008-
tmp = 0x00000001;
7009-
dspio_set_uint_param_no_source(codec, 0x80, 0x0B, tmp);
7010-
tmp = 0x00000004;
7011-
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7012-
tmp = 0x00000005;
7013-
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7014-
tmp = 0x00000000;
7015-
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7016-
break;
6988+
/*
6989+
* Gotta run these twice, or else mic works inconsistently. Not clear
6990+
* why this is, but multiple tests have confirmed it.
6991+
*/
6992+
for (i = 0; i < 2; i++) {
6993+
switch (spec->quirk) {
6994+
case QUIRK_SBZ:
6995+
case QUIRK_AE5:
6996+
tmp = 0x00000003;
6997+
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
6998+
tmp = 0x00000000;
6999+
dspio_set_uint_param_no_source(codec, 0x80, 0x0A, tmp);
7000+
tmp = 0x00000001;
7001+
dspio_set_uint_param_no_source(codec, 0x80, 0x0B, tmp);
7002+
tmp = 0x00000004;
7003+
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7004+
tmp = 0x00000005;
7005+
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7006+
tmp = 0x00000000;
7007+
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7008+
break;
7009+
case QUIRK_R3D:
7010+
case QUIRK_R3DI:
7011+
tmp = 0x00000000;
7012+
dspio_set_uint_param_no_source(codec, 0x80, 0x0A, tmp);
7013+
tmp = 0x00000001;
7014+
dspio_set_uint_param_no_source(codec, 0x80, 0x0B, tmp);
7015+
tmp = 0x00000004;
7016+
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7017+
tmp = 0x00000005;
7018+
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7019+
tmp = 0x00000000;
7020+
dspio_set_uint_param_no_source(codec, 0x80, 0x0C, tmp);
7021+
break;
7022+
}
7023+
msleep(100);
70177024
}
70187025
}
70197026

@@ -7246,8 +7253,6 @@ static void r3d_setup_defaults(struct hda_codec *codec)
72467253
int num_fx;
72477254
int idx, i;
72487255

7249-
msleep(100);
7250-
72517256
if (spec->dsp_state != DSP_DOWNLOADED)
72527257
return;
72537258

@@ -7292,8 +7297,6 @@ static void sbz_setup_defaults(struct hda_codec *codec)
72927297
int num_fx;
72937298
int idx, i;
72947299

7295-
msleep(100);
7296-
72977300
if (spec->dsp_state != DSP_DOWNLOADED)
72987301
return;
72997302

@@ -7351,8 +7354,6 @@ static void ae5_setup_defaults(struct hda_codec *codec)
73517354
int num_fx;
73527355
int idx, i;
73537356

7354-
msleep(100);
7355-
73567357
if (spec->dsp_state != DSP_DOWNLOADED)
73577358
return;
73587359

0 commit comments

Comments
 (0)