@@ -1940,17 +1940,7 @@ static int create_speaker_out_ctls(struct hda_codec *codec)
1940
1940
* independent HP controls
1941
1941
*/
1942
1942
1943
- /* update HP auto-mute state too */
1944
- static void update_hp_automute_hook (struct hda_codec * codec )
1945
- {
1946
- struct hda_gen_spec * spec = codec -> spec ;
1947
-
1948
- if (spec -> hp_automute_hook )
1949
- spec -> hp_automute_hook (codec , NULL );
1950
- else
1951
- snd_hda_gen_hp_automute (codec , NULL );
1952
- }
1953
-
1943
+ static void call_hp_automute (struct hda_codec * codec , struct hda_jack_tbl * jack );
1954
1944
static int indep_hp_info (struct snd_kcontrol * kcontrol ,
1955
1945
struct snd_ctl_elem_info * uinfo )
1956
1946
{
@@ -2011,7 +2001,7 @@ static int indep_hp_put(struct snd_kcontrol *kcontrol,
2011
2001
else
2012
2002
* dacp = spec -> alt_dac_nid ;
2013
2003
2014
- update_hp_automute_hook (codec );
2004
+ call_hp_automute (codec , NULL );
2015
2005
ret = 1 ;
2016
2006
}
2017
2007
unlock :
@@ -2307,7 +2297,7 @@ static void update_hp_mic(struct hda_codec *codec, int adc_mux, bool force)
2307
2297
else
2308
2298
val = PIN_HP ;
2309
2299
set_pin_target (codec , pin , val , true);
2310
- update_hp_automute_hook (codec );
2300
+ call_hp_automute (codec , NULL );
2311
2301
}
2312
2302
}
2313
2303
@@ -2716,7 +2706,7 @@ static int hp_mic_jack_mode_put(struct snd_kcontrol *kcontrol,
2716
2706
val = snd_hda_get_default_vref (codec , nid );
2717
2707
}
2718
2708
snd_hda_set_pin_ctl_cache (codec , nid , val );
2719
- update_hp_automute_hook (codec );
2709
+ call_hp_automute (codec , NULL );
2720
2710
2721
2711
return 1 ;
2722
2712
}
@@ -3861,22 +3851,6 @@ void snd_hda_gen_mic_autoswitch(struct hda_codec *codec, struct hda_jack_tbl *ja
3861
3851
}
3862
3852
EXPORT_SYMBOL_HDA (snd_hda_gen_mic_autoswitch );
3863
3853
3864
- /* update jack retasking */
3865
- static void update_automute_all (struct hda_codec * codec )
3866
- {
3867
- struct hda_gen_spec * spec = codec -> spec ;
3868
-
3869
- update_hp_automute_hook (codec );
3870
- if (spec -> line_automute_hook )
3871
- spec -> line_automute_hook (codec , NULL );
3872
- else
3873
- snd_hda_gen_line_automute (codec , NULL );
3874
- if (spec -> mic_autoswitch_hook )
3875
- spec -> mic_autoswitch_hook (codec , NULL );
3876
- else
3877
- snd_hda_gen_mic_autoswitch (codec , NULL );
3878
- }
3879
-
3880
3854
/* call appropriate hooks */
3881
3855
static void call_hp_automute (struct hda_codec * codec , struct hda_jack_tbl * jack )
3882
3856
{
@@ -3907,6 +3881,14 @@ static void call_mic_autoswitch(struct hda_codec *codec,
3907
3881
snd_hda_gen_mic_autoswitch (codec , jack );
3908
3882
}
3909
3883
3884
+ /* update jack retasking */
3885
+ static void update_automute_all (struct hda_codec * codec )
3886
+ {
3887
+ call_hp_automute (codec , NULL );
3888
+ call_line_automute (codec , NULL );
3889
+ call_mic_autoswitch (codec , NULL );
3890
+ }
3891
+
3910
3892
/*
3911
3893
* Auto-Mute mode mixer enum support
3912
3894
*/
0 commit comments