aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt286.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/rt286.c')
-rw-r--r--sound/soc/codecs/rt286.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 2cd4fe463102..99dcfec4834a 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -403,7 +403,8 @@ EXPORT_SYMBOL_GPL(rt286_mic_detect);
403static int is_mclk_mode(struct snd_soc_dapm_widget *source, 403static int is_mclk_mode(struct snd_soc_dapm_widget *source,
404 struct snd_soc_dapm_widget *sink) 404 struct snd_soc_dapm_widget *sink)
405{ 405{
406 struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(source->codec); 406 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm);
407 struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec);
407 408
408 if (rt286->clk_id == RT286_SCLK_S_MCLK) 409 if (rt286->clk_id == RT286_SCLK_S_MCLK)
409 return 1; 410 return 1;
@@ -500,7 +501,7 @@ SOC_DAPM_ENUM("SPO source", rt286_spo_enum);
500static int rt286_spk_event(struct snd_soc_dapm_widget *w, 501static int rt286_spk_event(struct snd_soc_dapm_widget *w,
501 struct snd_kcontrol *kcontrol, int event) 502 struct snd_kcontrol *kcontrol, int event)
502{ 503{
503 struct snd_soc_codec *codec = w->codec; 504 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
504 505
505 switch (event) { 506 switch (event) {
506 case SND_SOC_DAPM_POST_PMU: 507 case SND_SOC_DAPM_POST_PMU:
@@ -522,7 +523,7 @@ static int rt286_spk_event(struct snd_soc_dapm_widget *w,
522static int rt286_set_dmic1_event(struct snd_soc_dapm_widget *w, 523static int rt286_set_dmic1_event(struct snd_soc_dapm_widget *w,
523 struct snd_kcontrol *kcontrol, int event) 524 struct snd_kcontrol *kcontrol, int event)
524{ 525{
525 struct snd_soc_codec *codec = w->codec; 526 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
526 527
527 switch (event) { 528 switch (event) {
528 case SND_SOC_DAPM_POST_PMU: 529 case SND_SOC_DAPM_POST_PMU:
@@ -541,7 +542,7 @@ static int rt286_set_dmic1_event(struct snd_soc_dapm_widget *w,
541static int rt286_adc_event(struct snd_soc_dapm_widget *w, 542static int rt286_adc_event(struct snd_soc_dapm_widget *w,
542 struct snd_kcontrol *kcontrol, int event) 543 struct snd_kcontrol *kcontrol, int event)
543{ 544{
544 struct snd_soc_codec *codec = w->codec; 545 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
545 unsigned int nid; 546 unsigned int nid;
546 547
547 nid = (w->reg >> 20) & 0xff; 548 nid = (w->reg >> 20) & 0xff;
@@ -567,7 +568,7 @@ static int rt286_adc_event(struct snd_soc_dapm_widget *w,
567static int rt286_vref_event(struct snd_soc_dapm_widget *w, 568static int rt286_vref_event(struct snd_soc_dapm_widget *w,
568 struct snd_kcontrol *kcontrol, int event) 569 struct snd_kcontrol *kcontrol, int event)
569{ 570{
570 struct snd_soc_codec *codec = w->codec; 571 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
571 572
572 switch (event) { 573 switch (event) {
573 case SND_SOC_DAPM_PRE_PMU: 574 case SND_SOC_DAPM_PRE_PMU:
@@ -585,7 +586,7 @@ static int rt286_vref_event(struct snd_soc_dapm_widget *w,
585static int rt286_ldo2_event(struct snd_soc_dapm_widget *w, 586static int rt286_ldo2_event(struct snd_soc_dapm_widget *w,
586 struct snd_kcontrol *kcontrol, int event) 587 struct snd_kcontrol *kcontrol, int event)
587{ 588{
588 struct snd_soc_codec *codec = w->codec; 589 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
589 590
590 switch (event) { 591 switch (event) {
591 case SND_SOC_DAPM_POST_PMU: 592 case SND_SOC_DAPM_POST_PMU:
@@ -604,7 +605,7 @@ static int rt286_ldo2_event(struct snd_soc_dapm_widget *w,
604static int rt286_mic1_event(struct snd_soc_dapm_widget *w, 605static int rt286_mic1_event(struct snd_soc_dapm_widget *w,
605 struct snd_kcontrol *kcontrol, int event) 606 struct snd_kcontrol *kcontrol, int event)
606{ 607{
607 struct snd_soc_codec *codec = w->codec; 608 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
608 609
609 switch (event) { 610 switch (event) {
610 case SND_SOC_DAPM_PRE_PMU: 611 case SND_SOC_DAPM_PRE_PMU: