@@ -59,9 +59,6 @@ static void da7219_aad_btn_det_work(struct work_struct *work)
59
59
bool micbias_up = false;
60
60
int retries = 0 ;
61
61
62
- /* Disable ground switch */
63
- snd_soc_component_update_bits (component , 0xFB , 0x01 , 0x00 );
64
-
65
62
/* Drive headphones/lineout */
66
63
snd_soc_component_update_bits (component , DA7219_HP_L_CTRL ,
67
64
DA7219_HP_L_AMP_OE_MASK ,
@@ -155,9 +152,6 @@ static void da7219_aad_hptest_work(struct work_struct *work)
155
152
tonegen_freq_hptest = cpu_to_le16 (DA7219_AAD_HPTEST_RAMP_FREQ_INT_OSC );
156
153
}
157
154
158
- /* Disable ground switch */
159
- snd_soc_component_update_bits (component , 0xFB , 0x01 , 0x00 );
160
-
161
155
/* Ensure gain ramping at fastest rate */
162
156
gain_ramp_ctrl = snd_soc_component_read (component , DA7219_GAIN_RAMP_CTRL );
163
157
snd_soc_component_write (component , DA7219_GAIN_RAMP_CTRL , DA7219_GAIN_RAMP_RATE_X8 );
@@ -421,6 +415,11 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data)
421
415
* handle a removal, and we can check at the end of
422
416
* hptest if we have a valid result or not.
423
417
*/
418
+
419
+ cancel_delayed_work_sync (& da7219_aad -> jack_det_work );
420
+ /* Disable ground switch */
421
+ snd_soc_component_update_bits (component , 0xFB , 0x01 , 0x00 );
422
+
424
423
if (statusa & DA7219_JACK_TYPE_STS_MASK ) {
425
424
report |= SND_JACK_HEADSET ;
426
425
mask |= SND_JACK_HEADSET | SND_JACK_LINEOUT ;
0 commit comments