Skip to content

Commit

Permalink
ASoC: cpcap: HACK: potentially fix problem with voice audio routing
Browse files Browse the repository at this point in the history
  • Loading branch information
IMbackK committed Jul 2, 2022
1 parent 0db22f6 commit f5c15be
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions sound/soc/codecs/cpcap.c
Expand Up @@ -1473,6 +1473,31 @@ static int cpcap_voice_call(struct cpcap_audio *cpcap, struct snd_soc_dai *dai,
err = regmap_update_bits(cpcap->regmap, CPCAP_REG_CDI,
mask, voice_call ? mask : 0);

printk("VOICE CALL %i\n", voice_call);

if (voice_call)
{
struct snd_soc_dapm_widget *w;

w = snd_soc_dai_get_widget(dai, SNDRV_PCM_STREAM_PLAYBACK);

w->active = 1;
snd_soc_dai_activate(dai, SNDRV_PCM_STREAM_PLAYBACK);
snd_soc_dapm_force_enable_pin(w->dapm, w->name);
snd_soc_dapm_sync(w->dapm);
}
else
{
struct snd_soc_dapm_widget *w;

w = snd_soc_dai_get_widget(dai, SNDRV_PCM_STREAM_PLAYBACK);

w->active = 0;
snd_soc_dai_deactivate(dai, SNDRV_PCM_STREAM_PLAYBACK);
snd_soc_dapm_disable_pin(w->dapm, w->name);
snd_soc_dapm_sync(w->dapm);
}

return err;
}

Expand Down

0 comments on commit f5c15be

Please sign in to comment.