aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/intel/boards/cht_bsw_max98090_ti.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-08-30 15:52:12 +0100
committerMark Brown <broonie@kernel.org>2015-08-30 15:52:12 +0100
commitcb42e0f709a73caf4d631be32189bb1ca513ad25 (patch)
tree16a45cd33a8edf58967cd56cc74f51dbc3d91e5c /sound/soc/intel/boards/cht_bsw_max98090_ti.c
parentMerge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next (diff)
parentASoC: rt5645: Prevent the pop sound of the headphone while rebooting or shutdowning (diff)
downloadwireguard-linux-cb42e0f709a73caf4d631be32189bb1ca513ad25.tar.xz
wireguard-linux-cb42e0f709a73caf4d631be32189bb1ca513ad25.zip
Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next
Diffstat (limited to 'sound/soc/intel/boards/cht_bsw_max98090_ti.c')
-rw-r--r--sound/soc/intel/boards/cht_bsw_max98090_ti.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index 70f832114a5a..7810fc052869 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -104,21 +104,17 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream,
static int cht_ti_jack_event(struct notifier_block *nb,
unsigned long event, void *data)
{
-
struct snd_soc_jack *jack = (struct snd_soc_jack *)data;
- struct snd_soc_dai *codec_dai = jack->card->rtd->codec_dai;
- struct snd_soc_codec *codec = codec_dai->codec;
+ struct snd_soc_dapm_context *dapm = &jack->card->dapm;
if (event & SND_JACK_MICROPHONE) {
-
- snd_soc_dapm_force_enable_pin(&codec->dapm, "SHDN");
- snd_soc_dapm_force_enable_pin(&codec->dapm, "MICBIAS");
- snd_soc_dapm_sync(&codec->dapm);
+ snd_soc_dapm_force_enable_pin(dapm, "SHDN");
+ snd_soc_dapm_force_enable_pin(dapm, "MICBIAS");
+ snd_soc_dapm_sync(dapm);
} else {
-
- snd_soc_dapm_disable_pin(&codec->dapm, "MICBIAS");
- snd_soc_dapm_disable_pin(&codec->dapm, "SHDN");
- snd_soc_dapm_sync(&codec->dapm);
+ snd_soc_dapm_disable_pin(dapm, "MICBIAS");
+ snd_soc_dapm_disable_pin(dapm, "SHDN");
+ snd_soc_dapm_sync(dapm);
}
return 0;