aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm.c4
-rw-r--r--sound/pci/ac97/ac97_codec.c1
-rw-r--r--sound/pci/hda/hda_codec.c4
-rw-r--r--sound/pci/hda/hda_generic.c6
-rw-r--r--sound/pci/hda/patch_analog.c18
-rw-r--r--sound/pci/hda/patch_conexant.c11
-rw-r--r--sound/pci/hda/patch_hdmi.c18
-rw-r--r--sound/pci/hda/patch_realtek.c55
-rw-r--r--sound/pci/rme9652/hdsp.c1
-rw-r--r--sound/soc/blackfin/bf6xx-i2s.c1
-rw-r--r--sound/soc/codecs/88pm860x-codec.c3
-rw-r--r--sound/soc/codecs/ab8500-codec.c7
-rw-r--r--sound/soc/codecs/max98095.c4
-rw-r--r--sound/soc/codecs/pcm1681.c2
-rw-r--r--sound/soc/codecs/pcm1792a.c2
-rw-r--r--sound/soc/codecs/tlv320aic3x.c4
-rw-r--r--sound/soc/codecs/wm_hubs.c1
-rw-r--r--sound/soc/fsl/fsl_ssi.c2
-rw-r--r--sound/soc/fsl/imx-mc13783.c2
-rw-r--r--sound/soc/fsl/imx-sgtl5000.c7
-rw-r--r--sound/soc/fsl/imx-ssi.c23
-rw-r--r--sound/soc/fsl/imx-ssi.h2
-rw-r--r--sound/soc/omap/Kconfig4
-rw-r--r--sound/soc/sh/rcar/rsnd.h4
-rw-r--r--sound/soc/soc-core.c1
-rw-r--r--sound/soc/soc-dapm.c4
-rw-r--r--sound/usb/usx2y/us122l.c4
-rw-r--r--sound/usb/usx2y/usbusx2yaudio.c22
-rw-r--r--sound/usb/usx2y/usx2yhwdeppcm.c7
29 files changed, 157 insertions, 67 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 17f45e8aa89c..e1e9e0c999fe 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -49,6 +49,8 @@ static struct snd_pcm *snd_pcm_get(struct snd_card *card, int device)
49 struct snd_pcm *pcm; 49 struct snd_pcm *pcm;
50 50
51 list_for_each_entry(pcm, &snd_pcm_devices, list) { 51 list_for_each_entry(pcm, &snd_pcm_devices, list) {
52 if (pcm->internal)
53 continue;
52 if (pcm->card == card && pcm->device == device) 54 if (pcm->card == card && pcm->device == device)
53 return pcm; 55 return pcm;
54 } 56 }
@@ -60,6 +62,8 @@ static int snd_pcm_next(struct snd_card *card, int device)
60 struct snd_pcm *pcm; 62 struct snd_pcm *pcm;
61 63
62 list_for_each_entry(pcm, &snd_pcm_devices, list) { 64 list_for_each_entry(pcm, &snd_pcm_devices, list) {
65 if (pcm->internal)
66 continue;
63 if (pcm->card == card && pcm->device > device) 67 if (pcm->card == card && pcm->device > device)
64 return pcm->device; 68 return pcm->device;
65 else if (pcm->card->number > card->number) 69 else if (pcm->card->number > card->number)
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 445ca481d8d3..bf578ba2677e 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -175,6 +175,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
175{ 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, 175{ 0x54524106, 0xffffffff, "TR28026", NULL, NULL },
176{ 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99] 176{ 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99]
177{ 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)] 177{ 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)]
178{ 0x54584e03, 0xffffffff, "TLV320AIC27", NULL, NULL },
178{ 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, 179{ 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL },
179{ 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF 180{ 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF
180{ 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF 181{ 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 5b6c4e3c92ca..748c6a941963 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -4864,8 +4864,8 @@ static void hda_power_work(struct work_struct *work)
4864 spin_unlock(&codec->power_lock); 4864 spin_unlock(&codec->power_lock);
4865 4865
4866 state = hda_call_codec_suspend(codec, true); 4866 state = hda_call_codec_suspend(codec, true);
4867 codec->pm_down_notified = 0; 4867 if (!codec->pm_down_notified &&
4868 if (!bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) { 4868 !bus->power_keep_link_on && (state & AC_PWRST_CLK_STOP_OK)) {
4869 codec->pm_down_notified = 1; 4869 codec->pm_down_notified = 1;
4870 hda_call_pm_notify(bus, false); 4870 hda_call_pm_notify(bus, false);
4871 } 4871 }
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index ac41e9cdc976..b7c89dff7066 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -3531,7 +3531,7 @@ static int create_capture_mixers(struct hda_codec *codec)
3531 if (!multi) 3531 if (!multi)
3532 err = create_single_cap_vol_ctl(codec, n, vol, sw, 3532 err = create_single_cap_vol_ctl(codec, n, vol, sw,
3533 inv_dmic); 3533 inv_dmic);
3534 else if (!multi_cap_vol) 3534 else if (!multi_cap_vol && !inv_dmic)
3535 err = create_bind_cap_vol_ctl(codec, n, vol, sw); 3535 err = create_bind_cap_vol_ctl(codec, n, vol, sw);
3536 else 3536 else
3537 err = create_multi_cap_vol_ctl(codec); 3537 err = create_multi_cap_vol_ctl(codec);
@@ -4475,9 +4475,11 @@ int snd_hda_gen_build_controls(struct hda_codec *codec)
4475 true, &spec->vmaster_mute.sw_kctl); 4475 true, &spec->vmaster_mute.sw_kctl);
4476 if (err < 0) 4476 if (err < 0)
4477 return err; 4477 return err;
4478 if (spec->vmaster_mute.hook) 4478 if (spec->vmaster_mute.hook) {
4479 snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute, 4479 snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute,
4480 spec->vmaster_mute_enum); 4480 spec->vmaster_mute_enum);
4481 snd_hda_sync_vmaster_hook(&spec->vmaster_mute);
4482 }
4481 } 4483 }
4482 4484
4483 free_kctls(spec); /* no longer needed */ 4485 free_kctls(spec); /* no longer needed */
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 0cbdd87dde6d..2aa2f579b4d6 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -968,6 +968,15 @@ static void ad1884_fixup_hp_eapd(struct hda_codec *codec,
968 } 968 }
969} 969}
970 970
971static void ad1884_fixup_thinkpad(struct hda_codec *codec,
972 const struct hda_fixup *fix, int action)
973{
974 struct ad198x_spec *spec = codec->spec;
975
976 if (action == HDA_FIXUP_ACT_PRE_PROBE)
977 spec->gen.keep_eapd_on = 1;
978}
979
971/* set magic COEFs for dmic */ 980/* set magic COEFs for dmic */
972static const struct hda_verb ad1884_dmic_init_verbs[] = { 981static const struct hda_verb ad1884_dmic_init_verbs[] = {
973 {0x01, AC_VERB_SET_COEF_INDEX, 0x13f7}, 982 {0x01, AC_VERB_SET_COEF_INDEX, 0x13f7},
@@ -979,6 +988,7 @@ enum {
979 AD1884_FIXUP_AMP_OVERRIDE, 988 AD1884_FIXUP_AMP_OVERRIDE,
980 AD1884_FIXUP_HP_EAPD, 989 AD1884_FIXUP_HP_EAPD,
981 AD1884_FIXUP_DMIC_COEF, 990 AD1884_FIXUP_DMIC_COEF,
991 AD1884_FIXUP_THINKPAD,
982 AD1884_FIXUP_HP_TOUCHSMART, 992 AD1884_FIXUP_HP_TOUCHSMART,
983}; 993};
984 994
@@ -997,6 +1007,12 @@ static const struct hda_fixup ad1884_fixups[] = {
997 .type = HDA_FIXUP_VERBS, 1007 .type = HDA_FIXUP_VERBS,
998 .v.verbs = ad1884_dmic_init_verbs, 1008 .v.verbs = ad1884_dmic_init_verbs,
999 }, 1009 },
1010 [AD1884_FIXUP_THINKPAD] = {
1011 .type = HDA_FIXUP_FUNC,
1012 .v.func = ad1884_fixup_thinkpad,
1013 .chained = true,
1014 .chain_id = AD1884_FIXUP_DMIC_COEF,
1015 },
1000 [AD1884_FIXUP_HP_TOUCHSMART] = { 1016 [AD1884_FIXUP_HP_TOUCHSMART] = {
1001 .type = HDA_FIXUP_VERBS, 1017 .type = HDA_FIXUP_VERBS,
1002 .v.verbs = ad1884_dmic_init_verbs, 1018 .v.verbs = ad1884_dmic_init_verbs,
@@ -1008,7 +1024,7 @@ static const struct hda_fixup ad1884_fixups[] = {
1008static const struct snd_pci_quirk ad1884_fixup_tbl[] = { 1024static const struct snd_pci_quirk ad1884_fixup_tbl[] = {
1009 SND_PCI_QUIRK(0x103c, 0x2a82, "HP Touchsmart", AD1884_FIXUP_HP_TOUCHSMART), 1025 SND_PCI_QUIRK(0x103c, 0x2a82, "HP Touchsmart", AD1884_FIXUP_HP_TOUCHSMART),
1010 SND_PCI_QUIRK_VENDOR(0x103c, "HP", AD1884_FIXUP_HP_EAPD), 1026 SND_PCI_QUIRK_VENDOR(0x103c, "HP", AD1884_FIXUP_HP_EAPD),
1011 SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo Thinkpad", AD1884_FIXUP_DMIC_COEF), 1027 SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo Thinkpad", AD1884_FIXUP_THINKPAD),
1012 {} 1028 {}
1013}; 1029};
1014 1030
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 4edd2d0f9a3c..ec68eaea0336 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3231,6 +3231,7 @@ enum {
3231 CXT_FIXUP_INC_MIC_BOOST, 3231 CXT_FIXUP_INC_MIC_BOOST,
3232 CXT_FIXUP_HEADPHONE_MIC_PIN, 3232 CXT_FIXUP_HEADPHONE_MIC_PIN,
3233 CXT_FIXUP_HEADPHONE_MIC, 3233 CXT_FIXUP_HEADPHONE_MIC,
3234 CXT_FIXUP_GPIO1,
3234}; 3235};
3235 3236
3236static void cxt_fixup_stereo_dmic(struct hda_codec *codec, 3237static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
@@ -3375,6 +3376,15 @@ static const struct hda_fixup cxt_fixups[] = {
3375 .type = HDA_FIXUP_FUNC, 3376 .type = HDA_FIXUP_FUNC,
3376 .v.func = cxt_fixup_headphone_mic, 3377 .v.func = cxt_fixup_headphone_mic,
3377 }, 3378 },
3379 [CXT_FIXUP_GPIO1] = {
3380 .type = HDA_FIXUP_VERBS,
3381 .v.verbs = (const struct hda_verb[]) {
3382 { 0x01, AC_VERB_SET_GPIO_MASK, 0x01 },
3383 { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01 },
3384 { 0x01, AC_VERB_SET_GPIO_DATA, 0x01 },
3385 { }
3386 },
3387 },
3378}; 3388};
3379 3389
3380static const struct snd_pci_quirk cxt5051_fixups[] = { 3390static const struct snd_pci_quirk cxt5051_fixups[] = {
@@ -3384,6 +3394,7 @@ static const struct snd_pci_quirk cxt5051_fixups[] = {
3384 3394
3385static const struct snd_pci_quirk cxt5066_fixups[] = { 3395static const struct snd_pci_quirk cxt5066_fixups[] = {
3386 SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC), 3396 SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC),
3397 SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_GPIO1),
3387 SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), 3398 SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN),
3388 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), 3399 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
3389 SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410), 3400 SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410),
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 7ea0245fc6bd..50173d412ac5 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -937,6 +937,14 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
937 } 937 }
938 938
939 /* 939 /*
940 * always configure channel mapping, it may have been changed by the
941 * user in the meantime
942 */
943 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
944 channels, per_pin->chmap,
945 per_pin->chmap_set);
946
947 /*
940 * sizeof(ai) is used instead of sizeof(*hdmi_ai) or 948 * sizeof(ai) is used instead of sizeof(*hdmi_ai) or
941 * sizeof(*dp_ai) to avoid partial match/update problems when 949 * sizeof(*dp_ai) to avoid partial match/update problems when
942 * the user switches between HDMI/DP monitors. 950 * the user switches between HDMI/DP monitors.
@@ -947,20 +955,10 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
947 "pin=%d channels=%d\n", 955 "pin=%d channels=%d\n",
948 pin_nid, 956 pin_nid,
949 channels); 957 channels);
950 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
951 channels, per_pin->chmap,
952 per_pin->chmap_set);
953 hdmi_stop_infoframe_trans(codec, pin_nid); 958 hdmi_stop_infoframe_trans(codec, pin_nid);
954 hdmi_fill_audio_infoframe(codec, pin_nid, 959 hdmi_fill_audio_infoframe(codec, pin_nid,
955 ai.bytes, sizeof(ai)); 960 ai.bytes, sizeof(ai));
956 hdmi_start_infoframe_trans(codec, pin_nid); 961 hdmi_start_infoframe_trans(codec, pin_nid);
957 } else {
958 /* For non-pcm audio switch, setup new channel mapping
959 * accordingly */
960 if (per_pin->non_pcm != non_pcm)
961 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
962 channels, per_pin->chmap,
963 per_pin->chmap_set);
964 } 962 }
965 963
966 per_pin->non_pcm = non_pcm; 964 per_pin->non_pcm = non_pcm;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 0e303b99a47c..8ad554312b69 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2819,6 +2819,15 @@ static void alc269_fixup_hweq(struct hda_codec *codec,
2819 alc_write_coef_idx(codec, 0x1e, coef | 0x80); 2819 alc_write_coef_idx(codec, 0x1e, coef | 0x80);
2820} 2820}
2821 2821
2822static void alc269_fixup_headset_mic(struct hda_codec *codec,
2823 const struct hda_fixup *fix, int action)
2824{
2825 struct alc_spec *spec = codec->spec;
2826
2827 if (action == HDA_FIXUP_ACT_PRE_PROBE)
2828 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
2829}
2830
2822static void alc271_fixup_dmic(struct hda_codec *codec, 2831static void alc271_fixup_dmic(struct hda_codec *codec,
2823 const struct hda_fixup *fix, int action) 2832 const struct hda_fixup *fix, int action)
2824{ 2833{
@@ -3496,6 +3505,15 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
3496 } 3505 }
3497} 3506}
3498 3507
3508static void alc290_fixup_mono_speakers(struct hda_codec *codec,
3509 const struct hda_fixup *fix, int action)
3510{
3511 if (action == HDA_FIXUP_ACT_PRE_PROBE)
3512 /* Remove DAC node 0x03, as it seems to be
3513 giving mono output */
3514 snd_hda_override_wcaps(codec, 0x03, 0);
3515}
3516
3499enum { 3517enum {
3500 ALC269_FIXUP_SONY_VAIO, 3518 ALC269_FIXUP_SONY_VAIO,
3501 ALC275_FIXUP_SONY_VAIO_GPIO2, 3519 ALC275_FIXUP_SONY_VAIO_GPIO2,
@@ -3507,6 +3525,7 @@ enum {
3507 ALC271_FIXUP_DMIC, 3525 ALC271_FIXUP_DMIC,
3508 ALC269_FIXUP_PCM_44K, 3526 ALC269_FIXUP_PCM_44K,
3509 ALC269_FIXUP_STEREO_DMIC, 3527 ALC269_FIXUP_STEREO_DMIC,
3528 ALC269_FIXUP_HEADSET_MIC,
3510 ALC269_FIXUP_QUANTA_MUTE, 3529 ALC269_FIXUP_QUANTA_MUTE,
3511 ALC269_FIXUP_LIFEBOOK, 3530 ALC269_FIXUP_LIFEBOOK,
3512 ALC269_FIXUP_AMIC, 3531 ALC269_FIXUP_AMIC,
@@ -3519,9 +3538,11 @@ enum {
3519 ALC269_FIXUP_HP_GPIO_LED, 3538 ALC269_FIXUP_HP_GPIO_LED,
3520 ALC269_FIXUP_INV_DMIC, 3539 ALC269_FIXUP_INV_DMIC,
3521 ALC269_FIXUP_LENOVO_DOCK, 3540 ALC269_FIXUP_LENOVO_DOCK,
3541 ALC286_FIXUP_SONY_MIC_NO_PRESENCE,
3522 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, 3542 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
3523 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 3543 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
3524 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 3544 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
3545 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
3525 ALC269_FIXUP_HEADSET_MODE, 3546 ALC269_FIXUP_HEADSET_MODE,
3526 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, 3547 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
3527 ALC269_FIXUP_ASUS_X101_FUNC, 3548 ALC269_FIXUP_ASUS_X101_FUNC,
@@ -3535,6 +3556,7 @@ enum {
3535 ALC283_FIXUP_CHROME_BOOK, 3556 ALC283_FIXUP_CHROME_BOOK,
3536 ALC282_FIXUP_ASUS_TX300, 3557 ALC282_FIXUP_ASUS_TX300,
3537 ALC283_FIXUP_INT_MIC, 3558 ALC283_FIXUP_INT_MIC,
3559 ALC290_FIXUP_MONO_SPEAKERS,
3538}; 3560};
3539 3561
3540static const struct hda_fixup alc269_fixups[] = { 3562static const struct hda_fixup alc269_fixups[] = {
@@ -3603,6 +3625,10 @@ static const struct hda_fixup alc269_fixups[] = {
3603 .type = HDA_FIXUP_FUNC, 3625 .type = HDA_FIXUP_FUNC,
3604 .v.func = alc269_fixup_stereo_dmic, 3626 .v.func = alc269_fixup_stereo_dmic,
3605 }, 3627 },
3628 [ALC269_FIXUP_HEADSET_MIC] = {
3629 .type = HDA_FIXUP_FUNC,
3630 .v.func = alc269_fixup_headset_mic,
3631 },
3606 [ALC269_FIXUP_QUANTA_MUTE] = { 3632 [ALC269_FIXUP_QUANTA_MUTE] = {
3607 .type = HDA_FIXUP_FUNC, 3633 .type = HDA_FIXUP_FUNC,
3608 .v.func = alc269_fixup_quanta_mute, 3634 .v.func = alc269_fixup_quanta_mute,
@@ -3712,6 +3738,15 @@ static const struct hda_fixup alc269_fixups[] = {
3712 .chained = true, 3738 .chained = true,
3713 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 3739 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
3714 }, 3740 },
3741 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = {
3742 .type = HDA_FIXUP_PINS,
3743 .v.pins = (const struct hda_pintbl[]) {
3744 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
3745 { }
3746 },
3747 .chained = true,
3748 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
3749 },
3715 [ALC269_FIXUP_HEADSET_MODE] = { 3750 [ALC269_FIXUP_HEADSET_MODE] = {
3716 .type = HDA_FIXUP_FUNC, 3751 .type = HDA_FIXUP_FUNC,
3717 .v.func = alc_fixup_headset_mode, 3752 .v.func = alc_fixup_headset_mode,
@@ -3720,6 +3755,15 @@ static const struct hda_fixup alc269_fixups[] = {
3720 .type = HDA_FIXUP_FUNC, 3755 .type = HDA_FIXUP_FUNC,
3721 .v.func = alc_fixup_headset_mode_no_hp_mic, 3756 .v.func = alc_fixup_headset_mode_no_hp_mic,
3722 }, 3757 },
3758 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = {
3759 .type = HDA_FIXUP_PINS,
3760 .v.pins = (const struct hda_pintbl[]) {
3761 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
3762 { }
3763 },
3764 .chained = true,
3765 .chain_id = ALC269_FIXUP_HEADSET_MIC
3766 },
3723 [ALC269_FIXUP_ASUS_X101_FUNC] = { 3767 [ALC269_FIXUP_ASUS_X101_FUNC] = {
3724 .type = HDA_FIXUP_FUNC, 3768 .type = HDA_FIXUP_FUNC,
3725 .v.func = alc269_fixup_x101_headset_mic, 3769 .v.func = alc269_fixup_x101_headset_mic,
@@ -3804,6 +3848,12 @@ static const struct hda_fixup alc269_fixups[] = {
3804 .chained = true, 3848 .chained = true,
3805 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 3849 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
3806 }, 3850 },
3851 [ALC290_FIXUP_MONO_SPEAKERS] = {
3852 .type = HDA_FIXUP_FUNC,
3853 .v.func = alc290_fixup_mono_speakers,
3854 .chained = true,
3855 .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
3856 },
3807}; 3857};
3808 3858
3809static const struct snd_pci_quirk alc269_fixup_tbl[] = { 3859static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -3845,6 +3895,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3845 SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3895 SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3846 SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3896 SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3847 SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3897 SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3898 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS),
3848 SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), 3899 SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
3849 SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), 3900 SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
3850 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), 3901 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
@@ -3867,6 +3918,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3867 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), 3918 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
3868 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), 3919 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
3869 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101), 3920 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101),
3921 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
3870 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), 3922 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2),
3871 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 3923 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
3872 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 3924 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
@@ -3952,6 +4004,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
3952 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"}, 4004 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
3953 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, 4005 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
3954 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, 4006 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
4007 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
3955 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, 4008 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
3956 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, 4009 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
3957 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, 4010 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
@@ -4569,6 +4622,8 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
4569 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4622 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
4570 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4623 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
4571 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 4624 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
4625 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_ASUS_MODE4),
4626 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_ASUS_MODE4),
4572 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT), 4627 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
4573 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2), 4628 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
4574 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), 4629 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index 4f255dfee450..f59a321a6d6a 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -4845,6 +4845,7 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne
4845 if ((err = hdsp_get_iobox_version(hdsp)) < 0) 4845 if ((err = hdsp_get_iobox_version(hdsp)) < 0)
4846 return err; 4846 return err;
4847 } 4847 }
4848 memset(&hdsp_version, 0, sizeof(hdsp_version));
4848 hdsp_version.io_type = hdsp->io_type; 4849 hdsp_version.io_type = hdsp->io_type;
4849 hdsp_version.firmware_rev = hdsp->firmware_rev; 4850 hdsp_version.firmware_rev = hdsp->firmware_rev;
4850 if ((err = copy_to_user(argp, &hdsp_version, sizeof(hdsp_version)))) 4851 if ((err = copy_to_user(argp, &hdsp_version, sizeof(hdsp_version))))
diff --git a/sound/soc/blackfin/bf6xx-i2s.c b/sound/soc/blackfin/bf6xx-i2s.c
index c02405cc007d..5810a0603f2f 100644
--- a/sound/soc/blackfin/bf6xx-i2s.c
+++ b/sound/soc/blackfin/bf6xx-i2s.c
@@ -88,6 +88,7 @@ static int bfin_i2s_hw_params(struct snd_pcm_substream *substream,
88 case SNDRV_PCM_FORMAT_S8: 88 case SNDRV_PCM_FORMAT_S8:
89 param.spctl |= 0x70; 89 param.spctl |= 0x70;
90 sport->wdsize = 1; 90 sport->wdsize = 1;
91 break;
91 case SNDRV_PCM_FORMAT_S16_LE: 92 case SNDRV_PCM_FORMAT_S16_LE:
92 param.spctl |= 0xf0; 93 param.spctl |= 0xf0;
93 sport->wdsize = 2; 94 sport->wdsize = 2;
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index 8af04343cc1a..259d1ac4492f 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -349,6 +349,9 @@ static int snd_soc_put_volsw_2r_st(struct snd_kcontrol *kcontrol,
349 val = ucontrol->value.integer.value[0]; 349 val = ucontrol->value.integer.value[0];
350 val2 = ucontrol->value.integer.value[1]; 350 val2 = ucontrol->value.integer.value[1];
351 351
352 if (val >= ARRAY_SIZE(st_table) || val2 >= ARRAY_SIZE(st_table))
353 return -EINVAL;
354
352 err = snd_soc_update_bits(codec, reg, 0x3f, st_table[val].m); 355 err = snd_soc_update_bits(codec, reg, 0x3f, st_table[val].m);
353 if (err < 0) 356 if (err < 0)
354 return err; 357 return err;
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index b8ba0adacfce..80555d7551e6 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -1225,13 +1225,18 @@ static int anc_status_control_put(struct snd_kcontrol *kcontrol,
1225 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev); 1225 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev);
1226 struct device *dev = codec->dev; 1226 struct device *dev = codec->dev;
1227 bool apply_fir, apply_iir; 1227 bool apply_fir, apply_iir;
1228 int req, status; 1228 unsigned int req;
1229 int status;
1229 1230
1230 dev_dbg(dev, "%s: Enter.\n", __func__); 1231 dev_dbg(dev, "%s: Enter.\n", __func__);
1231 1232
1232 mutex_lock(&drvdata->anc_lock); 1233 mutex_lock(&drvdata->anc_lock);
1233 1234
1234 req = ucontrol->value.integer.value[0]; 1235 req = ucontrol->value.integer.value[0];
1236 if (req >= ARRAY_SIZE(enum_anc_state)) {
1237 status = -EINVAL;
1238 goto cleanup;
1239 }
1235 if (req != ANC_APPLY_FIR_IIR && req != ANC_APPLY_FIR && 1240 if (req != ANC_APPLY_FIR_IIR && req != ANC_APPLY_FIR &&
1236 req != ANC_APPLY_IIR) { 1241 req != ANC_APPLY_IIR) {
1237 dev_err(dev, "%s: ERROR: Unsupported status to set '%s'!\n", 1242 dev_err(dev, "%s: ERROR: Unsupported status to set '%s'!\n",
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 41cdd1642970..8dbcacd44e6a 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -1863,7 +1863,7 @@ static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol,
1863 struct max98095_pdata *pdata = max98095->pdata; 1863 struct max98095_pdata *pdata = max98095->pdata;
1864 int channel = max98095_get_eq_channel(kcontrol->id.name); 1864 int channel = max98095_get_eq_channel(kcontrol->id.name);
1865 struct max98095_cdata *cdata; 1865 struct max98095_cdata *cdata;
1866 int sel = ucontrol->value.integer.value[0]; 1866 unsigned int sel = ucontrol->value.integer.value[0];
1867 struct max98095_eq_cfg *coef_set; 1867 struct max98095_eq_cfg *coef_set;
1868 int fs, best, best_val, i; 1868 int fs, best, best_val, i;
1869 int regmask, regsave; 1869 int regmask, regsave;
@@ -2016,7 +2016,7 @@ static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol,
2016 struct max98095_pdata *pdata = max98095->pdata; 2016 struct max98095_pdata *pdata = max98095->pdata;
2017 int channel = max98095_get_bq_channel(codec, kcontrol->id.name); 2017 int channel = max98095_get_bq_channel(codec, kcontrol->id.name);
2018 struct max98095_cdata *cdata; 2018 struct max98095_cdata *cdata;
2019 int sel = ucontrol->value.integer.value[0]; 2019 unsigned int sel = ucontrol->value.integer.value[0];
2020 struct max98095_biquad_cfg *coef_set; 2020 struct max98095_biquad_cfg *coef_set;
2021 int fs, best, best_val, i; 2021 int fs, best, best_val, i;
2022 int regmask, regsave; 2022 int regmask, regsave;
diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
index 651ce0923675..c91eba504f92 100644
--- a/sound/soc/codecs/pcm1681.c
+++ b/sound/soc/codecs/pcm1681.c
@@ -270,7 +270,7 @@ MODULE_DEVICE_TABLE(of, pcm1681_dt_ids);
270static const struct regmap_config pcm1681_regmap = { 270static const struct regmap_config pcm1681_regmap = {
271 .reg_bits = 8, 271 .reg_bits = 8,
272 .val_bits = 8, 272 .val_bits = 8,
273 .max_register = ARRAY_SIZE(pcm1681_reg_defaults) + 1, 273 .max_register = 0x13,
274 .reg_defaults = pcm1681_reg_defaults, 274 .reg_defaults = pcm1681_reg_defaults,
275 .num_reg_defaults = ARRAY_SIZE(pcm1681_reg_defaults), 275 .num_reg_defaults = ARRAY_SIZE(pcm1681_reg_defaults),
276 .writeable_reg = pcm1681_writeable_reg, 276 .writeable_reg = pcm1681_writeable_reg,
diff --git a/sound/soc/codecs/pcm1792a.c b/sound/soc/codecs/pcm1792a.c
index 2a8eccf64c76..7613181123fe 100644
--- a/sound/soc/codecs/pcm1792a.c
+++ b/sound/soc/codecs/pcm1792a.c
@@ -188,7 +188,7 @@ MODULE_DEVICE_TABLE(of, pcm1792a_of_match);
188static const struct regmap_config pcm1792a_regmap = { 188static const struct regmap_config pcm1792a_regmap = {
189 .reg_bits = 8, 189 .reg_bits = 8,
190 .val_bits = 8, 190 .val_bits = 8,
191 .max_register = 24, 191 .max_register = 23,
192 .reg_defaults = pcm1792a_reg_defaults, 192 .reg_defaults = pcm1792a_reg_defaults,
193 .num_reg_defaults = ARRAY_SIZE(pcm1792a_reg_defaults), 193 .num_reg_defaults = ARRAY_SIZE(pcm1792a_reg_defaults),
194 .writeable_reg = pcm1792a_writeable_reg, 194 .writeable_reg = pcm1792a_writeable_reg,
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 6e3f269243e0..64ad84d8a306 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -674,6 +674,8 @@ static const struct snd_soc_dapm_route intercon[] = {
674 /* Left Input */ 674 /* Left Input */
675 {"Left Line1L Mux", "single-ended", "LINE1L"}, 675 {"Left Line1L Mux", "single-ended", "LINE1L"},
676 {"Left Line1L Mux", "differential", "LINE1L"}, 676 {"Left Line1L Mux", "differential", "LINE1L"},
677 {"Left Line1R Mux", "single-ended", "LINE1R"},
678 {"Left Line1R Mux", "differential", "LINE1R"},
677 679
678 {"Left Line2L Mux", "single-ended", "LINE2L"}, 680 {"Left Line2L Mux", "single-ended", "LINE2L"},
679 {"Left Line2L Mux", "differential", "LINE2L"}, 681 {"Left Line2L Mux", "differential", "LINE2L"},
@@ -690,6 +692,8 @@ static const struct snd_soc_dapm_route intercon[] = {
690 /* Right Input */ 692 /* Right Input */
691 {"Right Line1R Mux", "single-ended", "LINE1R"}, 693 {"Right Line1R Mux", "single-ended", "LINE1R"},
692 {"Right Line1R Mux", "differential", "LINE1R"}, 694 {"Right Line1R Mux", "differential", "LINE1R"},
695 {"Right Line1L Mux", "single-ended", "LINE1L"},
696 {"Right Line1L Mux", "differential", "LINE1L"},
693 697
694 {"Right Line2R Mux", "single-ended", "LINE2R"}, 698 {"Right Line2R Mux", "single-ended", "LINE2R"},
695 {"Right Line2R Mux", "differential", "LINE2R"}, 699 {"Right Line2R Mux", "differential", "LINE2R"},
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
index 8b50e5958de5..01daf655e20b 100644
--- a/sound/soc/codecs/wm_hubs.c
+++ b/sound/soc/codecs/wm_hubs.c
@@ -530,6 +530,7 @@ static int hp_supply_event(struct snd_soc_dapm_widget *w,
530 hubs->hp_startup_mode); 530 hubs->hp_startup_mode);
531 break; 531 break;
532 } 532 }
533 break;
533 534
534 case SND_SOC_DAPM_PRE_PMD: 535 case SND_SOC_DAPM_PRE_PMD:
535 snd_soc_update_bits(codec, WM8993_CHARGE_PUMP_1, 536 snd_soc_update_bits(codec, WM8993_CHARGE_PUMP_1,
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index c6b743978d5e..6b81d0ce2c44 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -936,7 +936,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
936 ssi_private->ssi_phys = res.start; 936 ssi_private->ssi_phys = res.start;
937 937
938 ssi_private->irq = irq_of_parse_and_map(np, 0); 938 ssi_private->irq = irq_of_parse_and_map(np, 0);
939 if (ssi_private->irq == NO_IRQ) { 939 if (ssi_private->irq == 0) {
940 dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); 940 dev_err(&pdev->dev, "no irq for node %s\n", np->full_name);
941 return -ENXIO; 941 return -ENXIO;
942 } 942 }
diff --git a/sound/soc/fsl/imx-mc13783.c b/sound/soc/fsl/imx-mc13783.c
index a3d60d4bea4c..a2fd7321b5a9 100644
--- a/sound/soc/fsl/imx-mc13783.c
+++ b/sound/soc/fsl/imx-mc13783.c
@@ -112,7 +112,7 @@ static int imx_mc13783_probe(struct platform_device *pdev)
112 return ret; 112 return ret;
113 } 113 }
114 114
115 if (machine_is_mx31_3ds()) { 115 if (machine_is_mx31_3ds() || machine_is_mx31moboard()) {
116 imx_audmux_v2_configure_port(MX31_AUDMUX_PORT4_SSI_PINS_4, 116 imx_audmux_v2_configure_port(MX31_AUDMUX_PORT4_SSI_PINS_4,
117 IMX_AUDMUX_V2_PTCR_SYN, 117 IMX_AUDMUX_V2_PTCR_SYN,
118 IMX_AUDMUX_V2_PDCR_RXDSEL(MX31_AUDMUX_PORT1_SSI0) | 118 IMX_AUDMUX_V2_PDCR_RXDSEL(MX31_AUDMUX_PORT1_SSI0) |
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index 46c5b4fdfc52..ca1be1d9dcf0 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -62,7 +62,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
62 struct device_node *ssi_np, *codec_np; 62 struct device_node *ssi_np, *codec_np;
63 struct platform_device *ssi_pdev; 63 struct platform_device *ssi_pdev;
64 struct i2c_client *codec_dev; 64 struct i2c_client *codec_dev;
65 struct imx_sgtl5000_data *data; 65 struct imx_sgtl5000_data *data = NULL;
66 int int_port, ext_port; 66 int int_port, ext_port;
67 int ret; 67 int ret;
68 68
@@ -128,7 +128,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
128 goto fail; 128 goto fail;
129 } 129 }
130 130
131 data->codec_clk = devm_clk_get(&codec_dev->dev, NULL); 131 data->codec_clk = clk_get(&codec_dev->dev, NULL);
132 if (IS_ERR(data->codec_clk)) { 132 if (IS_ERR(data->codec_clk)) {
133 ret = PTR_ERR(data->codec_clk); 133 ret = PTR_ERR(data->codec_clk);
134 goto fail; 134 goto fail;
@@ -172,6 +172,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
172 return 0; 172 return 0;
173 173
174fail: 174fail:
175 if (data && !IS_ERR(data->codec_clk))
176 clk_put(data->codec_clk);
175 if (ssi_np) 177 if (ssi_np)
176 of_node_put(ssi_np); 178 of_node_put(ssi_np);
177 if (codec_np) 179 if (codec_np)
@@ -185,6 +187,7 @@ static int imx_sgtl5000_remove(struct platform_device *pdev)
185 struct imx_sgtl5000_data *data = platform_get_drvdata(pdev); 187 struct imx_sgtl5000_data *data = platform_get_drvdata(pdev);
186 188
187 snd_soc_unregister_card(&data->card); 189 snd_soc_unregister_card(&data->card);
190 clk_put(data->codec_clk);
188 191
189 return 0; 192 return 0;
190} 193}
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index f58bcd85c07f..57d6941676ff 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -600,19 +600,17 @@ static int imx_ssi_probe(struct platform_device *pdev)
600 ssi->fiq_params.dma_params_rx = &ssi->dma_params_rx; 600 ssi->fiq_params.dma_params_rx = &ssi->dma_params_rx;
601 ssi->fiq_params.dma_params_tx = &ssi->dma_params_tx; 601 ssi->fiq_params.dma_params_tx = &ssi->dma_params_tx;
602 602
603 ret = imx_pcm_fiq_init(pdev, &ssi->fiq_params); 603 ssi->fiq_init = imx_pcm_fiq_init(pdev, &ssi->fiq_params);
604 if (ret) 604 ssi->dma_init = imx_pcm_dma_init(pdev);
605 goto failed_pcm_fiq;
606 605
607 ret = imx_pcm_dma_init(pdev); 606 if (ssi->fiq_init && ssi->dma_init) {
608 if (ret) 607 ret = ssi->fiq_init;
609 goto failed_pcm_dma; 608 goto failed_pcm;
609 }
610 610
611 return 0; 611 return 0;
612 612
613failed_pcm_dma: 613failed_pcm:
614 imx_pcm_fiq_exit(pdev);
615failed_pcm_fiq:
616 snd_soc_unregister_component(&pdev->dev); 614 snd_soc_unregister_component(&pdev->dev);
617failed_register: 615failed_register:
618 release_mem_region(res->start, resource_size(res)); 616 release_mem_region(res->start, resource_size(res));
@@ -628,8 +626,11 @@ static int imx_ssi_remove(struct platform_device *pdev)
628 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 626 struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
629 struct imx_ssi *ssi = platform_get_drvdata(pdev); 627 struct imx_ssi *ssi = platform_get_drvdata(pdev);
630 628
631 imx_pcm_dma_exit(pdev); 629 if (!ssi->dma_init)
632 imx_pcm_fiq_exit(pdev); 630 imx_pcm_dma_exit(pdev);
631
632 if (!ssi->fiq_init)
633 imx_pcm_fiq_exit(pdev);
633 634
634 snd_soc_unregister_component(&pdev->dev); 635 snd_soc_unregister_component(&pdev->dev);
635 636
diff --git a/sound/soc/fsl/imx-ssi.h b/sound/soc/fsl/imx-ssi.h
index fb1616ba8c59..560c40fc9ebb 100644
--- a/sound/soc/fsl/imx-ssi.h
+++ b/sound/soc/fsl/imx-ssi.h
@@ -211,6 +211,8 @@ struct imx_ssi {
211 struct imx_dma_data filter_data_rx; 211 struct imx_dma_data filter_data_rx;
212 struct imx_pcm_fiq_params fiq_params; 212 struct imx_pcm_fiq_params fiq_params;
213 213
214 int fiq_init;
215 int dma_init;
214 int enabled; 216 int enabled;
215}; 217};
216 218
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index daa78a0095fa..4a07f7179690 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -1,6 +1,6 @@
1config SND_OMAP_SOC 1config SND_OMAP_SOC
2 tristate "SoC Audio for the Texas Instruments OMAP chips" 2 tristate "SoC Audio for the Texas Instruments OMAP chips"
3 depends on (ARCH_OMAP && DMA_OMAP) || (ARCH_ARM && COMPILE_TEST) 3 depends on (ARCH_OMAP && DMA_OMAP) || (ARM && COMPILE_TEST)
4 select SND_DMAENGINE_PCM 4 select SND_DMAENGINE_PCM
5 5
6config SND_OMAP_SOC_DMIC 6config SND_OMAP_SOC_DMIC
@@ -26,7 +26,7 @@ config SND_OMAP_SOC_N810
26 26
27config SND_OMAP_SOC_RX51 27config SND_OMAP_SOC_RX51
28 tristate "SoC Audio support for Nokia RX-51" 28 tristate "SoC Audio support for Nokia RX-51"
29 depends on SND_OMAP_SOC && ARCH_ARM && (MACH_NOKIA_RX51 || COMPILE_TEST) 29 depends on SND_OMAP_SOC && ARM && (MACH_NOKIA_RX51 || COMPILE_TEST)
30 select SND_OMAP_SOC_MCBSP 30 select SND_OMAP_SOC_MCBSP
31 select SND_SOC_TLV320AIC3X 31 select SND_SOC_TLV320AIC3X
32 select SND_SOC_TPA6130A2 32 select SND_SOC_TPA6130A2
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 9cc6986a8cfb..5dd87f4c919e 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -220,8 +220,8 @@ int rsnd_gen_path_exit(struct rsnd_priv *priv,
220void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv, 220void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv,
221 struct rsnd_mod *mod, 221 struct rsnd_mod *mod,
222 enum rsnd_reg reg); 222 enum rsnd_reg reg);
223#define rsnd_is_gen1(s) ((s)->info->flags & RSND_GEN1) 223#define rsnd_is_gen1(s) (((s)->info->flags & RSND_GEN_MASK) == RSND_GEN1)
224#define rsnd_is_gen2(s) ((s)->info->flags & RSND_GEN2) 224#define rsnd_is_gen2(s) (((s)->info->flags & RSND_GEN_MASK) == RSND_GEN2)
225 225
226/* 226/*
227 * R-Car ADG 227 * R-Car ADG
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4d0561312f3b..1a38be0d0ca8 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1380,7 +1380,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
1380 return -ENODEV; 1380 return -ENODEV;
1381 1381
1382 list_add(&cpu_dai->dapm.list, &card->dapm_list); 1382 list_add(&cpu_dai->dapm.list, &card->dapm_list);
1383 snd_soc_dapm_new_dai_widgets(&cpu_dai->dapm, cpu_dai);
1384 } 1383 }
1385 1384
1386 if (cpu_dai->driver->probe) { 1385 if (cpu_dai->driver->probe) {
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index c17c14c394df..b2949aed1ac2 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1949,7 +1949,7 @@ static ssize_t dapm_widget_power_read_file(struct file *file,
1949 w->active ? "active" : "inactive"); 1949 w->active ? "active" : "inactive");
1950 1950
1951 list_for_each_entry(p, &w->sources, list_sink) { 1951 list_for_each_entry(p, &w->sources, list_sink) {
1952 if (p->connected && !p->connected(w, p->sink)) 1952 if (p->connected && !p->connected(w, p->source))
1953 continue; 1953 continue;
1954 1954
1955 if (p->connect) 1955 if (p->connect)
@@ -3495,6 +3495,7 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
3495 if (!w) { 3495 if (!w) {
3496 dev_err(dapm->dev, "ASoC: Failed to create %s widget\n", 3496 dev_err(dapm->dev, "ASoC: Failed to create %s widget\n",
3497 dai->driver->playback.stream_name); 3497 dai->driver->playback.stream_name);
3498 return -ENOMEM;
3498 } 3499 }
3499 3500
3500 w->priv = dai; 3501 w->priv = dai;
@@ -3513,6 +3514,7 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
3513 if (!w) { 3514 if (!w) {
3514 dev_err(dapm->dev, "ASoC: Failed to create %s widget\n", 3515 dev_err(dapm->dev, "ASoC: Failed to create %s widget\n",
3515 dai->driver->capture.stream_name); 3516 dai->driver->capture.stream_name);
3517 return -ENOMEM;
3516 } 3518 }
3517 3519
3518 w->priv = dai; 3520 w->priv = dai;
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c
index d0323a693ba2..999550bbad40 100644
--- a/sound/usb/usx2y/us122l.c
+++ b/sound/usb/usx2y/us122l.c
@@ -262,7 +262,9 @@ static int usb_stream_hwdep_mmap(struct snd_hwdep *hw,
262 } 262 }
263 263
264 area->vm_ops = &usb_stream_hwdep_vm_ops; 264 area->vm_ops = &usb_stream_hwdep_vm_ops;
265 area->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; 265 area->vm_flags |= VM_DONTDUMP;
266 if (!read)
267 area->vm_flags |= VM_DONTEXPAND;
266 area->vm_private_data = us122l; 268 area->vm_private_data = us122l;
267 atomic_inc(&us122l->mmap_count); 269 atomic_inc(&us122l->mmap_count);
268out: 270out:
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
index 63fb5219f0f8..6234a51625b1 100644
--- a/sound/usb/usx2y/usbusx2yaudio.c
+++ b/sound/usb/usx2y/usbusx2yaudio.c
@@ -299,19 +299,6 @@ static void usX2Y_error_urb_status(struct usX2Ydev *usX2Y,
299 usX2Y_clients_stop(usX2Y); 299 usX2Y_clients_stop(usX2Y);
300} 300}
301 301
302static void usX2Y_error_sequence(struct usX2Ydev *usX2Y,
303 struct snd_usX2Y_substream *subs, struct urb *urb)
304{
305 snd_printk(KERN_ERR
306"Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n"
307"Most probably some urb of usb-frame %i is still missing.\n"
308"Cause could be too long delays in usb-hcd interrupt handling.\n",
309 usb_get_current_frame_number(usX2Y->dev),
310 subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out",
311 usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame);
312 usX2Y_clients_stop(usX2Y);
313}
314
315static void i_usX2Y_urb_complete(struct urb *urb) 302static void i_usX2Y_urb_complete(struct urb *urb)
316{ 303{
317 struct snd_usX2Y_substream *subs = urb->context; 304 struct snd_usX2Y_substream *subs = urb->context;
@@ -328,12 +315,9 @@ static void i_usX2Y_urb_complete(struct urb *urb)
328 usX2Y_error_urb_status(usX2Y, subs, urb); 315 usX2Y_error_urb_status(usX2Y, subs, urb);
329 return; 316 return;
330 } 317 }
331 if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF))) 318
332 subs->completed_urb = urb; 319 subs->completed_urb = urb;
333 else { 320
334 usX2Y_error_sequence(usX2Y, subs, urb);
335 return;
336 }
337 { 321 {
338 struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE], 322 struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE],
339 *playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; 323 *playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];
diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c
index f2a1acdc4d83..814d0e887c62 100644
--- a/sound/usb/usx2y/usx2yhwdeppcm.c
+++ b/sound/usb/usx2y/usx2yhwdeppcm.c
@@ -244,13 +244,8 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb)
244 usX2Y_error_urb_status(usX2Y, subs, urb); 244 usX2Y_error_urb_status(usX2Y, subs, urb);
245 return; 245 return;
246 } 246 }
247 if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF)))
248 subs->completed_urb = urb;
249 else {
250 usX2Y_error_sequence(usX2Y, subs, urb);
251 return;
252 }
253 247
248 subs->completed_urb = urb;
254 capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; 249 capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE];
255 capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2]; 250 capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2];
256 playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; 251 playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK];