Skip to content

Commit

Permalink
ASoC: es8336: ensure that GPIOs will be set at start streaming
Browse files Browse the repository at this point in the history
As the headphone could be plugged or unplugged any time, including
when not streaming, and the stop/suspend events may be turning GPIOs
to disable both headphones and speakers, let the delayed workqueue
to be called every time Speaker supply event happens.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mchehab committed Dec 30, 2023
1 parent 5662ff9 commit b0f5cf2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/soc/intel/boards/sof_es8336.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,9 @@ static int sof_es8316_speaker_power_event(struct snd_soc_dapm_widget *w,
struct snd_soc_card *card = w->dapm->card;
struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card);

if (priv->speaker_en == SND_SOC_DAPM_EVENT_ON(event))
return 0;

priv->speaker_en = SND_SOC_DAPM_EVENT_ON(event);

queue_delayed_work(system_wq, &priv->pcm_pop_work, msecs_to_jiffies(70));

return 0;
}

Expand Down

0 comments on commit b0f5cf2

Please sign in to comment.