aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-12-17 09:40:55 -0500
committerTakashi Iwai <tiwai@suse.de>2012-12-17 09:40:55 -0500
commit6be7f5344b4fca35f1955aa73f0de825316a3236 (patch)
tree25ccce9c837fbc7beef026b46852197b637be901 /sound
parentdf68f106436b684520212494a5ce0e3823b485da (diff)
parent8246b5b03ef4ab6f29ad8edad859c74b124323cb (diff)
Merge tag 'asoc-3.8p1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: More updates for v3.8 Nothing terribly exciting here, just small localised changes. As well as fixes there are a couple of Cirrus changes and one devm_ change which were in prior to the merge window but got missed from the original pull to Takashi.
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/cs42l73.c116
-rw-r--r--sound/soc/codecs/sigmadsp.c2
-rw-r--r--sound/soc/codecs/tpa6130a2.c23
-rw-r--r--sound/soc/soc-compress.c2
-rw-r--r--sound/soc/soc-core.c10
-rw-r--r--sound/soc/soc-pcm.c12
6 files changed, 108 insertions, 57 deletions
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index a0791ecf6d95..6361dab48bd1 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -40,6 +40,7 @@ struct cs42l73_private {
40 u32 sysclk; 40 u32 sysclk;
41 u8 mclksel; 41 u8 mclksel;
42 u32 mclk; 42 u32 mclk;
43 int shutdwn_delay;
43}; 44};
44 45
45static const struct reg_default cs42l73_reg_defaults[] = { 46static const struct reg_default cs42l73_reg_defaults[] = {
@@ -588,7 +589,60 @@ static const struct snd_kcontrol_new cs42l73_snd_controls[] = {
588 SOC_ENUM("XSPOUT Mono/Stereo Select", xsp_output_mux_enum), 589 SOC_ENUM("XSPOUT Mono/Stereo Select", xsp_output_mux_enum),
589}; 590};
590 591
592static int cs42l73_spklo_spk_amp_event(struct snd_soc_dapm_widget *w,
593 struct snd_kcontrol *kcontrol, int event)
594{
595 struct snd_soc_codec *codec = w->codec;
596 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec);
597 switch (event) {
598 case SND_SOC_DAPM_POST_PMD:
599 /* 150 ms delay between setting PDN and MCLKDIS */
600 priv->shutdwn_delay = 150;
601 break;
602 default:
603 pr_err("Invalid event = 0x%x\n", event);
604 }
605 return 0;
606}
607
608static int cs42l73_ear_amp_event(struct snd_soc_dapm_widget *w,
609 struct snd_kcontrol *kcontrol, int event)
610{
611 struct snd_soc_codec *codec = w->codec;
612 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec);
613 switch (event) {
614 case SND_SOC_DAPM_POST_PMD:
615 /* 50 ms delay between setting PDN and MCLKDIS */
616 if (priv->shutdwn_delay < 50)
617 priv->shutdwn_delay = 50;
618 break;
619 default:
620 pr_err("Invalid event = 0x%x\n", event);
621 }
622 return 0;
623}
624
625
626static int cs42l73_hp_amp_event(struct snd_soc_dapm_widget *w,
627 struct snd_kcontrol *kcontrol, int event)
628{
629 struct snd_soc_codec *codec = w->codec;
630 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec);
631 switch (event) {
632 case SND_SOC_DAPM_POST_PMD:
633 /* 30 ms delay between setting PDN and MCLKDIS */
634 if (priv->shutdwn_delay < 30)
635 priv->shutdwn_delay = 30;
636 break;
637 default:
638 pr_err("Invalid event = 0x%x\n", event);
639 }
640 return 0;
641}
642
591static const struct snd_soc_dapm_widget cs42l73_dapm_widgets[] = { 643static const struct snd_soc_dapm_widget cs42l73_dapm_widgets[] = {
644 SND_SOC_DAPM_INPUT("DMICA"),
645 SND_SOC_DAPM_INPUT("DMICB"),
592 SND_SOC_DAPM_INPUT("LINEINA"), 646 SND_SOC_DAPM_INPUT("LINEINA"),
593 SND_SOC_DAPM_INPUT("LINEINB"), 647 SND_SOC_DAPM_INPUT("LINEINB"),
594 SND_SOC_DAPM_INPUT("MIC1"), 648 SND_SOC_DAPM_INPUT("MIC1"),
@@ -604,9 +658,7 @@ static const struct snd_soc_dapm_widget cs42l73_dapm_widgets[] = {
604 CS42L73_PWRCTL2, 3, 1), 658 CS42L73_PWRCTL2, 3, 1),
605 SND_SOC_DAPM_AIF_OUT("ASPOUTR", NULL, 0, 659 SND_SOC_DAPM_AIF_OUT("ASPOUTR", NULL, 0,
606 CS42L73_PWRCTL2, 3, 1), 660 CS42L73_PWRCTL2, 3, 1),
607 SND_SOC_DAPM_AIF_OUT("VSPOUTL", NULL, 0, 661 SND_SOC_DAPM_AIF_OUT("VSPINOUT", NULL, 0,
608 CS42L73_PWRCTL2, 4, 1),
609 SND_SOC_DAPM_AIF_OUT("VSPOUTR", NULL, 0,
610 CS42L73_PWRCTL2, 4, 1), 662 CS42L73_PWRCTL2, 4, 1),
611 663
612 SND_SOC_DAPM_PGA("PGA Left", SND_SOC_NOPM, 0, 0, NULL, 0), 664 SND_SOC_DAPM_PGA("PGA Left", SND_SOC_NOPM, 0, 0, NULL, 0),
@@ -632,8 +684,7 @@ static const struct snd_soc_dapm_widget cs42l73_dapm_widgets[] = {
632 SND_SOC_DAPM_MIXER("ASPR Output Mixer", SND_SOC_NOPM, 0, 0, NULL, 0), 684 SND_SOC_DAPM_MIXER("ASPR Output Mixer", SND_SOC_NOPM, 0, 0, NULL, 0),
633 SND_SOC_DAPM_MIXER("XSPL Output Mixer", SND_SOC_NOPM, 0, 0, NULL, 0), 685 SND_SOC_DAPM_MIXER("XSPL Output Mixer", SND_SOC_NOPM, 0, 0, NULL, 0),
634 SND_SOC_DAPM_MIXER("XSPR Output Mixer", SND_SOC_NOPM, 0, 0, NULL, 0), 686 SND_SOC_DAPM_MIXER("XSPR Output Mixer", SND_SOC_NOPM, 0, 0, NULL, 0),
635 SND_SOC_DAPM_MIXER("VSPL Output Mixer", SND_SOC_NOPM, 0, 0, NULL, 0), 687 SND_SOC_DAPM_MIXER("VSP Output Mixer", SND_SOC_NOPM, 0, 0, NULL, 0),
636 SND_SOC_DAPM_MIXER("VSPR Output Mixer", SND_SOC_NOPM, 0, 0, NULL, 0),
637 688
638 SND_SOC_DAPM_AIF_IN("XSPINL", NULL, 0, 689 SND_SOC_DAPM_AIF_IN("XSPINL", NULL, 0,
639 CS42L73_PWRCTL2, 0, 1), 690 CS42L73_PWRCTL2, 0, 1),
@@ -649,7 +700,7 @@ static const struct snd_soc_dapm_widget cs42l73_dapm_widgets[] = {
649 SND_SOC_DAPM_AIF_IN("ASPINM", NULL, 0, 700 SND_SOC_DAPM_AIF_IN("ASPINM", NULL, 0,
650 CS42L73_PWRCTL2, 2, 1), 701 CS42L73_PWRCTL2, 2, 1),
651 702
652 SND_SOC_DAPM_AIF_IN("VSPIN", NULL, 0, 703 SND_SOC_DAPM_AIF_IN("VSPINOUT", NULL, 0,
653 CS42L73_PWRCTL2, 4, 1), 704 CS42L73_PWRCTL2, 4, 1),
654 705
655 SND_SOC_DAPM_MIXER("HL Left Mixer", SND_SOC_NOPM, 0, 0, NULL, 0), 706 SND_SOC_DAPM_MIXER("HL Left Mixer", SND_SOC_NOPM, 0, 0, NULL, 0),
@@ -674,16 +725,20 @@ static const struct snd_soc_dapm_widget cs42l73_dapm_widgets[] = {
674 SND_SOC_DAPM_PGA("SPK DAC", SND_SOC_NOPM, 0, 0, NULL, 0), 725 SND_SOC_DAPM_PGA("SPK DAC", SND_SOC_NOPM, 0, 0, NULL, 0),
675 SND_SOC_DAPM_PGA("ESL DAC", SND_SOC_NOPM, 0, 0, NULL, 0), 726 SND_SOC_DAPM_PGA("ESL DAC", SND_SOC_NOPM, 0, 0, NULL, 0),
676 727
677 SND_SOC_DAPM_SWITCH("HP Amp", CS42L73_PWRCTL3, 0, 1, 728 SND_SOC_DAPM_SWITCH_E("HP Amp", CS42L73_PWRCTL3, 0, 1,
678 &hp_amp_ctl), 729 &hp_amp_ctl, cs42l73_hp_amp_event,
730 SND_SOC_DAPM_POST_PMD),
679 SND_SOC_DAPM_SWITCH("LO Amp", CS42L73_PWRCTL3, 1, 1, 731 SND_SOC_DAPM_SWITCH("LO Amp", CS42L73_PWRCTL3, 1, 1,
680 &lo_amp_ctl), 732 &lo_amp_ctl),
681 SND_SOC_DAPM_SWITCH("SPK Amp", CS42L73_PWRCTL3, 2, 1, 733 SND_SOC_DAPM_SWITCH_E("SPK Amp", CS42L73_PWRCTL3, 2, 1,
682 &spk_amp_ctl), 734 &spk_amp_ctl, cs42l73_spklo_spk_amp_event,
683 SND_SOC_DAPM_SWITCH("EAR Amp", CS42L73_PWRCTL3, 3, 1, 735 SND_SOC_DAPM_POST_PMD),
684 &ear_amp_ctl), 736 SND_SOC_DAPM_SWITCH_E("EAR Amp", CS42L73_PWRCTL3, 3, 1,
685 SND_SOC_DAPM_SWITCH("SPKLO Amp", CS42L73_PWRCTL3, 4, 1, 737 &ear_amp_ctl, cs42l73_ear_amp_event,
686 &spklo_amp_ctl), 738 SND_SOC_DAPM_POST_PMD),
739 SND_SOC_DAPM_SWITCH_E("SPKLO Amp", CS42L73_PWRCTL3, 4, 1,
740 &spklo_amp_ctl, cs42l73_spklo_spk_amp_event,
741 SND_SOC_DAPM_POST_PMD),
687 742
688 SND_SOC_DAPM_OUTPUT("HPOUTA"), 743 SND_SOC_DAPM_OUTPUT("HPOUTA"),
689 SND_SOC_DAPM_OUTPUT("HPOUTB"), 744 SND_SOC_DAPM_OUTPUT("HPOUTB"),
@@ -705,7 +760,7 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = {
705 760
706 {"ESL DAC", "ESL-ASP Mono Volume", "ESL Mixer"}, 761 {"ESL DAC", "ESL-ASP Mono Volume", "ESL Mixer"},
707 {"ESL DAC", "ESL-XSP Mono Volume", "ESL Mixer"}, 762 {"ESL DAC", "ESL-XSP Mono Volume", "ESL Mixer"},
708 {"ESL DAC", "ESL-VSP Mono Volume", "VSPIN"}, 763 {"ESL DAC", "ESL-VSP Mono Volume", "VSPINOUT"},
709 /* Loopback */ 764 /* Loopback */
710 {"ESL DAC", "ESL-IP Mono Volume", "Input Left Capture"}, 765 {"ESL DAC", "ESL-IP Mono Volume", "Input Left Capture"},
711 {"ESL DAC", "ESL-IP Mono Volume", "Input Right Capture"}, 766 {"ESL DAC", "ESL-IP Mono Volume", "Input Right Capture"},
@@ -727,7 +782,7 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = {
727 782
728 {"SPK DAC", "SPK-ASP Mono Volume", "SPK Mixer"}, 783 {"SPK DAC", "SPK-ASP Mono Volume", "SPK Mixer"},
729 {"SPK DAC", "SPK-XSP Mono Volume", "SPK Mixer"}, 784 {"SPK DAC", "SPK-XSP Mono Volume", "SPK Mixer"},
730 {"SPK DAC", "SPK-VSP Mono Volume", "VSPIN"}, 785 {"SPK DAC", "SPK-VSP Mono Volume", "VSPINOUT"},
731 /* Loopback */ 786 /* Loopback */
732 {"SPK DAC", "SPK-IP Mono Volume", "Input Left Capture"}, 787 {"SPK DAC", "SPK-IP Mono Volume", "Input Left Capture"},
733 {"SPK DAC", "SPK-IP Mono Volume", "Input Right Capture"}, 788 {"SPK DAC", "SPK-IP Mono Volume", "Input Right Capture"},
@@ -770,8 +825,8 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = {
770 {"HL Right Mixer", NULL, "ASPINR"}, 825 {"HL Right Mixer", NULL, "ASPINR"},
771 {"HL Left Mixer", NULL, "XSPINL"}, 826 {"HL Left Mixer", NULL, "XSPINL"},
772 {"HL Right Mixer", NULL, "XSPINR"}, 827 {"HL Right Mixer", NULL, "XSPINR"},
773 {"HL Left Mixer", NULL, "VSPIN"}, 828 {"HL Left Mixer", NULL, "VSPINOUT"},
774 {"HL Right Mixer", NULL, "VSPIN"}, 829 {"HL Right Mixer", NULL, "VSPINOUT"},
775 830
776 {"ASPINL", NULL, "ASP Playback"}, 831 {"ASPINL", NULL, "ASP Playback"},
777 {"ASPINM", NULL, "ASP Playback"}, 832 {"ASPINM", NULL, "ASP Playback"},
@@ -779,7 +834,7 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = {
779 {"XSPINL", NULL, "XSP Playback"}, 834 {"XSPINL", NULL, "XSP Playback"},
780 {"XSPINM", NULL, "XSP Playback"}, 835 {"XSPINM", NULL, "XSP Playback"},
781 {"XSPINR", NULL, "XSP Playback"}, 836 {"XSPINR", NULL, "XSP Playback"},
782 {"VSPIN", NULL, "VSP Playback"}, 837 {"VSPINOUT", NULL, "VSP Playback"},
783 838
784 /* Capture Paths */ 839 /* Capture Paths */
785 {"MIC1", NULL, "MIC1 Bias"}, 840 {"MIC1", NULL, "MIC1 Bias"},
@@ -795,6 +850,8 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = {
795 850
796 {"ADC Left", NULL, "PGA Left"}, 851 {"ADC Left", NULL, "PGA Left"},
797 {"ADC Right", NULL, "PGA Right"}, 852 {"ADC Right", NULL, "PGA Right"},
853 {"DMIC Left", NULL, "DMICA"},
854 {"DMIC Right", NULL, "DMICB"},
798 855
799 {"Input Left Capture", "ADC Left Input", "ADC Left"}, 856 {"Input Left Capture", "ADC Left Input", "ADC Left"},
800 {"Input Right Capture", "ADC Right Input", "ADC Right"}, 857 {"Input Right Capture", "ADC Right Input", "ADC Right"},
@@ -819,21 +876,18 @@ static const struct snd_soc_dapm_route cs42l73_audio_map[] = {
819 {"XSPOUTR", NULL, "XSPR Output Mixer"}, 876 {"XSPOUTR", NULL, "XSPR Output Mixer"},
820 877
821 /* Voice Capture */ 878 /* Voice Capture */
822 {"VSPL Output Mixer", NULL, "Input Left Capture"}, 879 {"VSP Output Mixer", NULL, "Input Left Capture"},
823 {"VSPR Output Mixer", NULL, "Input Left Capture"}, 880 {"VSP Output Mixer", NULL, "Input Right Capture"},
824 881
825 {"VSPOUTL", "VSP-IP Volume", "VSPL Output Mixer"}, 882 {"VSPINOUT", "VSP-IP Volume", "VSP Output Mixer"},
826 {"VSPOUTR", "VSP-IP Volume", "VSPR Output Mixer"},
827 883
828 {"VSPOUTL", NULL, "VSPL Output Mixer"}, 884 {"VSPINOUT", NULL, "VSP Output Mixer"},
829 {"VSPOUTR", NULL, "VSPR Output Mixer"},
830 885
831 {"ASP Capture", NULL, "ASPOUTL"}, 886 {"ASP Capture", NULL, "ASPOUTL"},
832 {"ASP Capture", NULL, "ASPOUTR"}, 887 {"ASP Capture", NULL, "ASPOUTR"},
833 {"XSP Capture", NULL, "XSPOUTL"}, 888 {"XSP Capture", NULL, "XSPOUTL"},
834 {"XSP Capture", NULL, "XSPOUTR"}, 889 {"XSP Capture", NULL, "XSPOUTR"},
835 {"VSP Capture", NULL, "VSPOUTL"}, 890 {"VSP Capture", NULL, "VSPINOUT"},
836 {"VSP Capture", NULL, "VSPOUTR"},
837}; 891};
838 892
839struct cs42l73_mclk_div { 893struct cs42l73_mclk_div {
@@ -1167,6 +1221,14 @@ static int cs42l73_set_bias_level(struct snd_soc_codec *codec,
1167 1221
1168 case SND_SOC_BIAS_OFF: 1222 case SND_SOC_BIAS_OFF:
1169 snd_soc_update_bits(codec, CS42L73_PWRCTL1, PDN, 1); 1223 snd_soc_update_bits(codec, CS42L73_PWRCTL1, PDN, 1);
1224 if (cs42l73->shutdwn_delay > 0) {
1225 mdelay(cs42l73->shutdwn_delay);
1226 cs42l73->shutdwn_delay = 0;
1227 } else {
1228 mdelay(15); /* Min amount of time requred to power
1229 * down.
1230 */
1231 }
1170 snd_soc_update_bits(codec, CS42L73_DMMCC, MCLKDIS, 1); 1232 snd_soc_update_bits(codec, CS42L73_DMMCC, MCLKDIS, 1);
1171 break; 1233 break;
1172 } 1234 }
diff --git a/sound/soc/codecs/sigmadsp.c b/sound/soc/codecs/sigmadsp.c
index 5be42bf56996..4068f2491232 100644
--- a/sound/soc/codecs/sigmadsp.c
+++ b/sound/soc/codecs/sigmadsp.c
@@ -225,7 +225,7 @@ EXPORT_SYMBOL(process_sigma_firmware);
225static int sigma_action_write_regmap(void *control_data, 225static int sigma_action_write_regmap(void *control_data,
226 const struct sigma_action *sa, size_t len) 226 const struct sigma_action *sa, size_t len)
227{ 227{
228 return regmap_raw_write(control_data, le16_to_cpu(sa->addr), 228 return regmap_raw_write(control_data, be16_to_cpu(sa->addr),
229 sa->payload, len - 2); 229 sa->payload, len - 2);
230} 230}
231 231
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index 8d75aa152c8c..c58bee8346ce 100644
--- a/sound/soc/codecs/tpa6130a2.c
+++ b/sound/soc/codecs/tpa6130a2.c
@@ -398,7 +398,8 @@ static int tpa6130a2_probe(struct i2c_client *client,
398 TPA6130A2_MUTE_L; 398 TPA6130A2_MUTE_L;
399 399
400 if (data->power_gpio >= 0) { 400 if (data->power_gpio >= 0) {
401 ret = gpio_request(data->power_gpio, "tpa6130a2 enable"); 401 ret = devm_gpio_request(dev, data->power_gpio,
402 "tpa6130a2 enable");
402 if (ret < 0) { 403 if (ret < 0) {
403 dev_err(dev, "Failed to request power GPIO (%d)\n", 404 dev_err(dev, "Failed to request power GPIO (%d)\n",
404 data->power_gpio); 405 data->power_gpio);
@@ -419,16 +420,16 @@ static int tpa6130a2_probe(struct i2c_client *client,
419 break; 420 break;
420 } 421 }
421 422
422 data->supply = regulator_get(dev, regulator); 423 data->supply = devm_regulator_get(dev, regulator);
423 if (IS_ERR(data->supply)) { 424 if (IS_ERR(data->supply)) {
424 ret = PTR_ERR(data->supply); 425 ret = PTR_ERR(data->supply);
425 dev_err(dev, "Failed to request supply: %d\n", ret); 426 dev_err(dev, "Failed to request supply: %d\n", ret);
426 goto err_regulator; 427 goto err_gpio;
427 } 428 }
428 429
429 ret = tpa6130a2_power(1); 430 ret = tpa6130a2_power(1);
430 if (ret != 0) 431 if (ret != 0)
431 goto err_power; 432 goto err_gpio;
432 433
433 434
434 /* Read version */ 435 /* Read version */
@@ -440,15 +441,10 @@ static int tpa6130a2_probe(struct i2c_client *client,
440 /* Disable the chip */ 441 /* Disable the chip */
441 ret = tpa6130a2_power(0); 442 ret = tpa6130a2_power(0);
442 if (ret != 0) 443 if (ret != 0)
443 goto err_power; 444 goto err_gpio;
444 445
445 return 0; 446 return 0;
446 447
447err_power:
448 regulator_put(data->supply);
449err_regulator:
450 if (data->power_gpio >= 0)
451 gpio_free(data->power_gpio);
452err_gpio: 448err_gpio:
453 tpa6130a2_client = NULL; 449 tpa6130a2_client = NULL;
454 450
@@ -457,14 +453,7 @@ err_gpio:
457 453
458static int tpa6130a2_remove(struct i2c_client *client) 454static int tpa6130a2_remove(struct i2c_client *client)
459{ 455{
460 struct tpa6130a2_data *data = i2c_get_clientdata(client);
461
462 tpa6130a2_power(0); 456 tpa6130a2_power(0);
463
464 if (data->power_gpio >= 0)
465 gpio_free(data->power_gpio);
466
467 regulator_put(data->supply);
468 tpa6130a2_client = NULL; 457 tpa6130a2_client = NULL;
469 458
470 return 0; 459 return 0;
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 967d0e173e1b..5fbfb06e8083 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -113,7 +113,7 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
113 SNDRV_PCM_STREAM_PLAYBACK, 113 SNDRV_PCM_STREAM_PLAYBACK,
114 SND_SOC_DAPM_STREAM_STOP); 114 SND_SOC_DAPM_STREAM_STOP);
115 } else 115 } else
116 codec_dai->pop_wait = 1; 116 rtd->pop_wait = 1;
117 schedule_delayed_work(&rtd->delayed_work, 117 schedule_delayed_work(&rtd->delayed_work,
118 msecs_to_jiffies(rtd->pmdown_time)); 118 msecs_to_jiffies(rtd->pmdown_time));
119 } else { 119 } else {
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 9c768bcb98a6..91d592ff67b7 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -4155,9 +4155,9 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
4155 ret = of_property_read_string_index(np, propname, 4155 ret = of_property_read_string_index(np, propname,
4156 2 * i, &routes[i].sink); 4156 2 * i, &routes[i].sink);
4157 if (ret) { 4157 if (ret) {
4158 dev_err(card->dev, "ASoC: Property '%s' index %d" 4158 dev_err(card->dev,
4159 " could not be read: %d\n", propname, 2 * i, 4159 "ASoC: Property '%s' index %d could not be read: %d\n",
4160 ret); 4160 propname, 2 * i, ret);
4161 kfree(routes); 4161 kfree(routes);
4162 return -EINVAL; 4162 return -EINVAL;
4163 } 4163 }
@@ -4165,8 +4165,8 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
4165 (2 * i) + 1, &routes[i].source); 4165 (2 * i) + 1, &routes[i].source);
4166 if (ret) { 4166 if (ret) {
4167 dev_err(card->dev, 4167 dev_err(card->dev,
4168 "ASoC: Property '%s' index %d could not be" 4168 "ASoC: Property '%s' index %d could not be read: %d\n",
4169 " read: %d\n", propname, (2 * i) + 1, ret); 4169 propname, (2 * i) + 1, ret);
4170 kfree(routes); 4170 kfree(routes);
4171 return -EINVAL; 4171 return -EINVAL;
4172 } 4172 }
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 5c3ca2a34661..d7711fce119b 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -334,11 +334,11 @@ static void close_delayed_work(struct work_struct *work)
334 dev_dbg(rtd->dev, "ASoC: pop wq checking: %s status: %s waiting: %s\n", 334 dev_dbg(rtd->dev, "ASoC: pop wq checking: %s status: %s waiting: %s\n",
335 codec_dai->driver->playback.stream_name, 335 codec_dai->driver->playback.stream_name,
336 codec_dai->playback_active ? "active" : "inactive", 336 codec_dai->playback_active ? "active" : "inactive",
337 codec_dai->pop_wait ? "yes" : "no"); 337 rtd->pop_wait ? "yes" : "no");
338 338
339 /* are we waiting on this codec DAI stream */ 339 /* are we waiting on this codec DAI stream */
340 if (codec_dai->pop_wait == 1) { 340 if (rtd->pop_wait == 1) {
341 codec_dai->pop_wait = 0; 341 rtd->pop_wait = 0;
342 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK, 342 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
343 SND_SOC_DAPM_STREAM_STOP); 343 SND_SOC_DAPM_STREAM_STOP);
344 } 344 }
@@ -408,7 +408,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
408 SND_SOC_DAPM_STREAM_STOP); 408 SND_SOC_DAPM_STREAM_STOP);
409 } else { 409 } else {
410 /* start delayed pop wq here for playback streams */ 410 /* start delayed pop wq here for playback streams */
411 codec_dai->pop_wait = 1; 411 rtd->pop_wait = 1;
412 schedule_delayed_work(&rtd->delayed_work, 412 schedule_delayed_work(&rtd->delayed_work,
413 msecs_to_jiffies(rtd->pmdown_time)); 413 msecs_to_jiffies(rtd->pmdown_time));
414 } 414 }
@@ -480,8 +480,8 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
480 480
481 /* cancel any delayed stream shutdown that is pending */ 481 /* cancel any delayed stream shutdown that is pending */
482 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && 482 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
483 codec_dai->pop_wait) { 483 rtd->pop_wait) {
484 codec_dai->pop_wait = 0; 484 rtd->pop_wait = 0;
485 cancel_delayed_work(&rtd->delayed_work); 485 cancel_delayed_work(&rtd->delayed_work);
486 } 486 }
487 487