@@ -6983,37 +6983,44 @@ static void sbz_chipio_startup_data(struct hda_codec *codec)
6983
6983
static void ca0132_alt_dsp_scp_startup (struct hda_codec * codec )
6984
6984
{
6985
6985
struct ca0132_spec * spec = codec -> spec ;
6986
- unsigned int tmp ;
6986
+ unsigned int tmp , i ;
6987
6987
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 );
7017
7024
}
7018
7025
}
7019
7026
@@ -7246,8 +7253,6 @@ static void r3d_setup_defaults(struct hda_codec *codec)
7246
7253
int num_fx ;
7247
7254
int idx , i ;
7248
7255
7249
- msleep (100 );
7250
-
7251
7256
if (spec -> dsp_state != DSP_DOWNLOADED )
7252
7257
return ;
7253
7258
@@ -7292,8 +7297,6 @@ static void sbz_setup_defaults(struct hda_codec *codec)
7292
7297
int num_fx ;
7293
7298
int idx , i ;
7294
7299
7295
- msleep (100 );
7296
-
7297
7300
if (spec -> dsp_state != DSP_DOWNLOADED )
7298
7301
return ;
7299
7302
@@ -7351,8 +7354,6 @@ static void ae5_setup_defaults(struct hda_codec *codec)
7351
7354
int num_fx ;
7352
7355
int idx , i ;
7353
7356
7354
- msleep (100 );
7355
-
7356
7357
if (spec -> dsp_state != DSP_DOWNLOADED )
7357
7358
return ;
7358
7359
0 commit comments