diff options
| -rw-r--r-- | sound/isa/opti9xx/miro.c | 1 | ||||
| -rw-r--r-- | sound/pci/als300.c | 4 | ||||
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 20 | ||||
| -rw-r--r-- | sound/pci/rme9652/hdspm.c | 234 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8994.c | 18 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8994.h | 1 | ||||
| -rw-r--r-- | sound/soc/ux500/mop500.c | 17 | ||||
| -rw-r--r-- | sound/soc/ux500/ux500_msp_i2s.c | 8 |
8 files changed, 200 insertions, 103 deletions
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index 3d1afb612b35..4a7ff4e8985b 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c | |||
| @@ -1286,7 +1286,6 @@ static int __devinit snd_miro_probe(struct snd_card *card) | |||
| 1286 | 1286 | ||
| 1287 | error = snd_card_miro_aci_detect(card, miro); | 1287 | error = snd_card_miro_aci_detect(card, miro); |
| 1288 | if (error < 0) { | 1288 | if (error < 0) { |
| 1289 | snd_card_free(card); | ||
| 1290 | snd_printk(KERN_ERR "unable to detect aci chip\n"); | 1289 | snd_printk(KERN_ERR "unable to detect aci chip\n"); |
| 1291 | return -ENODEV; | 1290 | return -ENODEV; |
| 1292 | } | 1291 | } |
diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 00f157a2cf64..5af3cb6b0c18 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c | |||
| @@ -394,6 +394,8 @@ static int snd_als300_playback_open(struct snd_pcm_substream *substream) | |||
| 394 | struct snd_als300_substream_data *data = kzalloc(sizeof(*data), | 394 | struct snd_als300_substream_data *data = kzalloc(sizeof(*data), |
| 395 | GFP_KERNEL); | 395 | GFP_KERNEL); |
| 396 | 396 | ||
| 397 | if (!data) | ||
| 398 | return -ENOMEM; | ||
| 397 | snd_als300_dbgcallenter(); | 399 | snd_als300_dbgcallenter(); |
| 398 | chip->playback_substream = substream; | 400 | chip->playback_substream = substream; |
| 399 | runtime->hw = snd_als300_playback_hw; | 401 | runtime->hw = snd_als300_playback_hw; |
| @@ -425,6 +427,8 @@ static int snd_als300_capture_open(struct snd_pcm_substream *substream) | |||
| 425 | struct snd_als300_substream_data *data = kzalloc(sizeof(*data), | 427 | struct snd_als300_substream_data *data = kzalloc(sizeof(*data), |
| 426 | GFP_KERNEL); | 428 | GFP_KERNEL); |
| 427 | 429 | ||
| 430 | if (!data) | ||
| 431 | return -ENOMEM; | ||
| 428 | snd_als300_dbgcallenter(); | 432 | snd_als300_dbgcallenter(); |
| 429 | chip->capture_substream = substream; | 433 | chip->capture_substream = substream; |
| 430 | runtime->hw = snd_als300_capture_hw; | 434 | runtime->hw = snd_als300_capture_hw; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 48d9d609f89b..f7397ad02a0d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -5677,6 +5677,7 @@ static const struct hda_verb alc268_beep_init_verbs[] = { | |||
| 5677 | 5677 | ||
| 5678 | enum { | 5678 | enum { |
| 5679 | ALC268_FIXUP_INV_DMIC, | 5679 | ALC268_FIXUP_INV_DMIC, |
| 5680 | ALC268_FIXUP_HP_EAPD, | ||
| 5680 | }; | 5681 | }; |
| 5681 | 5682 | ||
| 5682 | static const struct alc_fixup alc268_fixups[] = { | 5683 | static const struct alc_fixup alc268_fixups[] = { |
| @@ -5684,10 +5685,26 @@ static const struct alc_fixup alc268_fixups[] = { | |||
| 5684 | .type = ALC_FIXUP_FUNC, | 5685 | .type = ALC_FIXUP_FUNC, |
| 5685 | .v.func = alc_fixup_inv_dmic_0x12, | 5686 | .v.func = alc_fixup_inv_dmic_0x12, |
| 5686 | }, | 5687 | }, |
| 5688 | [ALC268_FIXUP_HP_EAPD] = { | ||
| 5689 | .type = ALC_FIXUP_VERBS, | ||
| 5690 | .v.verbs = (const struct hda_verb[]) { | ||
| 5691 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 0}, | ||
| 5692 | {} | ||
| 5693 | } | ||
| 5694 | }, | ||
| 5687 | }; | 5695 | }; |
| 5688 | 5696 | ||
| 5689 | static const struct alc_model_fixup alc268_fixup_models[] = { | 5697 | static const struct alc_model_fixup alc268_fixup_models[] = { |
| 5690 | {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"}, | 5698 | {.id = ALC268_FIXUP_INV_DMIC, .name = "inv-dmic"}, |
| 5699 | {.id = ALC268_FIXUP_HP_EAPD, .name = "hp-eapd"}, | ||
| 5700 | {} | ||
| 5701 | }; | ||
| 5702 | |||
| 5703 | static const struct snd_pci_quirk alc268_fixup_tbl[] = { | ||
| 5704 | /* below is codec SSID since multiple Toshiba laptops have the | ||
| 5705 | * same PCI SSID 1179:ff00 | ||
| 5706 | */ | ||
| 5707 | SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD), | ||
| 5691 | {} | 5708 | {} |
| 5692 | }; | 5709 | }; |
| 5693 | 5710 | ||
| @@ -5722,7 +5739,7 @@ static int patch_alc268(struct hda_codec *codec) | |||
| 5722 | 5739 | ||
| 5723 | spec = codec->spec; | 5740 | spec = codec->spec; |
| 5724 | 5741 | ||
| 5725 | alc_pick_fixup(codec, alc268_fixup_models, NULL, alc268_fixups); | 5742 | alc_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups); |
| 5726 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); | 5743 | alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); |
| 5727 | 5744 | ||
| 5728 | /* automatic parse from the BIOS config */ | 5745 | /* automatic parse from the BIOS config */ |
| @@ -6188,6 +6205,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
| 6188 | SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), | 6205 | SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), |
| 6189 | SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK), | 6206 | SND_PCI_QUIRK(0x17aa, 0x21f6, "Thinkpad T530", ALC269_FIXUP_LENOVO_DOCK), |
| 6190 | SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK), | 6207 | SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK), |
| 6208 | SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK), | ||
| 6191 | SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), | 6209 | SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), |
| 6192 | SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), | 6210 | SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), |
| 6193 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), | 6211 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index b12308b5ba2a..f1cd1e387801 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
| @@ -971,6 +971,7 @@ static inline void snd_hdspm_initialize_midi_flush(struct hdspm *hdspm); | |||
| 971 | static int hdspm_update_simple_mixer_controls(struct hdspm *hdspm); | 971 | static int hdspm_update_simple_mixer_controls(struct hdspm *hdspm); |
| 972 | static int hdspm_autosync_ref(struct hdspm *hdspm); | 972 | static int hdspm_autosync_ref(struct hdspm *hdspm); |
| 973 | static int snd_hdspm_set_defaults(struct hdspm *hdspm); | 973 | static int snd_hdspm_set_defaults(struct hdspm *hdspm); |
| 974 | static int hdspm_system_clock_mode(struct hdspm *hdspm); | ||
| 974 | static void hdspm_set_sgbuf(struct hdspm *hdspm, | 975 | static void hdspm_set_sgbuf(struct hdspm *hdspm, |
| 975 | struct snd_pcm_substream *substream, | 976 | struct snd_pcm_substream *substream, |
| 976 | unsigned int reg, int channels); | 977 | unsigned int reg, int channels); |
| @@ -1989,10 +1990,14 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm) | |||
| 1989 | rate = hdspm_calc_dds_value(hdspm, period); | 1990 | rate = hdspm_calc_dds_value(hdspm, period); |
| 1990 | 1991 | ||
| 1991 | if (rate > 207000) { | 1992 | if (rate > 207000) { |
| 1992 | /* Unreasonable high sample rate as seen on PCI MADI cards. | 1993 | /* Unreasonable high sample rate as seen on PCI MADI cards. */ |
| 1993 | * Use the cached value instead. | 1994 | if (0 == hdspm_system_clock_mode(hdspm)) { |
| 1994 | */ | 1995 | /* master mode, return internal sample rate */ |
| 1995 | rate = hdspm->system_sample_rate; | 1996 | rate = hdspm->system_sample_rate; |
| 1997 | } else { | ||
| 1998 | /* slave mode, return external sample rate */ | ||
| 1999 | rate = hdspm_external_sample_rate(hdspm); | ||
| 2000 | } | ||
| 1996 | } | 2001 | } |
| 1997 | 2002 | ||
| 1998 | return rate; | 2003 | return rate; |
| @@ -2000,12 +2005,14 @@ static int hdspm_get_system_sample_rate(struct hdspm *hdspm) | |||
| 2000 | 2005 | ||
| 2001 | 2006 | ||
| 2002 | #define HDSPM_SYSTEM_SAMPLE_RATE(xname, xindex) \ | 2007 | #define HDSPM_SYSTEM_SAMPLE_RATE(xname, xindex) \ |
| 2003 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 2008 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 2004 | .name = xname, \ | 2009 | .name = xname, \ |
| 2005 | .index = xindex, \ | 2010 | .index = xindex, \ |
| 2006 | .access = SNDRV_CTL_ELEM_ACCESS_READ, \ | 2011 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |\ |
| 2007 | .info = snd_hdspm_info_system_sample_rate, \ | 2012 | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ |
| 2008 | .get = snd_hdspm_get_system_sample_rate \ | 2013 | .info = snd_hdspm_info_system_sample_rate, \ |
| 2014 | .put = snd_hdspm_put_system_sample_rate, \ | ||
| 2015 | .get = snd_hdspm_get_system_sample_rate \ | ||
| 2009 | } | 2016 | } |
| 2010 | 2017 | ||
| 2011 | static int snd_hdspm_info_system_sample_rate(struct snd_kcontrol *kcontrol, | 2018 | static int snd_hdspm_info_system_sample_rate(struct snd_kcontrol *kcontrol, |
| @@ -2030,6 +2037,16 @@ static int snd_hdspm_get_system_sample_rate(struct snd_kcontrol *kcontrol, | |||
| 2030 | return 0; | 2037 | return 0; |
| 2031 | } | 2038 | } |
| 2032 | 2039 | ||
| 2040 | static int snd_hdspm_put_system_sample_rate(struct snd_kcontrol *kcontrol, | ||
| 2041 | struct snd_ctl_elem_value * | ||
| 2042 | ucontrol) | ||
| 2043 | { | ||
| 2044 | struct hdspm *hdspm = snd_kcontrol_chip(kcontrol); | ||
| 2045 | |||
| 2046 | hdspm_set_dds_value(hdspm, ucontrol->value.enumerated.item[0]); | ||
| 2047 | return 0; | ||
| 2048 | } | ||
| 2049 | |||
| 2033 | 2050 | ||
| 2034 | /** | 2051 | /** |
| 2035 | * Returns the WordClock sample rate class for the given card. | 2052 | * Returns the WordClock sample rate class for the given card. |
| @@ -2163,6 +2180,7 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol, | |||
| 2163 | hdspm_get_s1_sample_rate(hdspm, | 2180 | hdspm_get_s1_sample_rate(hdspm, |
| 2164 | kcontrol->private_value-1); | 2181 | kcontrol->private_value-1); |
| 2165 | } | 2182 | } |
| 2183 | break; | ||
| 2166 | 2184 | ||
| 2167 | case AIO: | 2185 | case AIO: |
| 2168 | switch (kcontrol->private_value) { | 2186 | switch (kcontrol->private_value) { |
| @@ -2183,6 +2201,7 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol, | |||
| 2183 | hdspm_get_s1_sample_rate(hdspm, | 2201 | hdspm_get_s1_sample_rate(hdspm, |
| 2184 | ucontrol->id.index-1); | 2202 | ucontrol->id.index-1); |
| 2185 | } | 2203 | } |
| 2204 | break; | ||
| 2186 | 2205 | ||
| 2187 | case AES32: | 2206 | case AES32: |
| 2188 | 2207 | ||
| @@ -2204,8 +2223,23 @@ static int snd_hdspm_get_autosync_sample_rate(struct snd_kcontrol *kcontrol, | |||
| 2204 | hdspm_get_s1_sample_rate(hdspm, | 2223 | hdspm_get_s1_sample_rate(hdspm, |
| 2205 | kcontrol->private_value-1); | 2224 | kcontrol->private_value-1); |
| 2206 | break; | 2225 | break; |
| 2226 | } | ||
| 2227 | break; | ||
| 2207 | 2228 | ||
| 2229 | case MADI: | ||
| 2230 | case MADIface: | ||
| 2231 | { | ||
| 2232 | int rate = hdspm_external_sample_rate(hdspm); | ||
| 2233 | int i, selected_rate = 0; | ||
| 2234 | for (i = 1; i < 10; i++) | ||
| 2235 | if (HDSPM_bit2freq(i) == rate) { | ||
| 2236 | selected_rate = i; | ||
| 2237 | break; | ||
| 2238 | } | ||
| 2239 | ucontrol->value.enumerated.item[0] = selected_rate; | ||
| 2208 | } | 2240 | } |
| 2241 | break; | ||
| 2242 | |||
| 2209 | default: | 2243 | default: |
| 2210 | break; | 2244 | break; |
| 2211 | } | 2245 | } |
| @@ -2430,7 +2464,7 @@ static int snd_hdspm_put_clock_source(struct snd_kcontrol *kcontrol, | |||
| 2430 | 2464 | ||
| 2431 | 2465 | ||
| 2432 | #define HDSPM_PREF_SYNC_REF(xname, xindex) \ | 2466 | #define HDSPM_PREF_SYNC_REF(xname, xindex) \ |
| 2433 | {.iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 2467 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 2434 | .name = xname, \ | 2468 | .name = xname, \ |
| 2435 | .index = xindex, \ | 2469 | .index = xindex, \ |
| 2436 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |\ | 2470 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |\ |
| @@ -2766,12 +2800,12 @@ static int snd_hdspm_put_pref_sync_ref(struct snd_kcontrol *kcontrol, | |||
| 2766 | 2800 | ||
| 2767 | 2801 | ||
| 2768 | #define HDSPM_AUTOSYNC_REF(xname, xindex) \ | 2802 | #define HDSPM_AUTOSYNC_REF(xname, xindex) \ |
| 2769 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 2803 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 2770 | .name = xname, \ | 2804 | .name = xname, \ |
| 2771 | .index = xindex, \ | 2805 | .index = xindex, \ |
| 2772 | .access = SNDRV_CTL_ELEM_ACCESS_READ, \ | 2806 | .access = SNDRV_CTL_ELEM_ACCESS_READ, \ |
| 2773 | .info = snd_hdspm_info_autosync_ref, \ | 2807 | .info = snd_hdspm_info_autosync_ref, \ |
| 2774 | .get = snd_hdspm_get_autosync_ref, \ | 2808 | .get = snd_hdspm_get_autosync_ref, \ |
| 2775 | } | 2809 | } |
| 2776 | 2810 | ||
| 2777 | static int hdspm_autosync_ref(struct hdspm *hdspm) | 2811 | static int hdspm_autosync_ref(struct hdspm *hdspm) |
| @@ -2855,12 +2889,12 @@ static int snd_hdspm_get_autosync_ref(struct snd_kcontrol *kcontrol, | |||
| 2855 | 2889 | ||
| 2856 | 2890 | ||
| 2857 | #define HDSPM_LINE_OUT(xname, xindex) \ | 2891 | #define HDSPM_LINE_OUT(xname, xindex) \ |
| 2858 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 2892 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 2859 | .name = xname, \ | 2893 | .name = xname, \ |
| 2860 | .index = xindex, \ | 2894 | .index = xindex, \ |
| 2861 | .info = snd_hdspm_info_line_out, \ | 2895 | .info = snd_hdspm_info_line_out, \ |
| 2862 | .get = snd_hdspm_get_line_out, \ | 2896 | .get = snd_hdspm_get_line_out, \ |
| 2863 | .put = snd_hdspm_put_line_out \ | 2897 | .put = snd_hdspm_put_line_out \ |
| 2864 | } | 2898 | } |
| 2865 | 2899 | ||
| 2866 | static int hdspm_line_out(struct hdspm * hdspm) | 2900 | static int hdspm_line_out(struct hdspm * hdspm) |
| @@ -2912,12 +2946,12 @@ static int snd_hdspm_put_line_out(struct snd_kcontrol *kcontrol, | |||
| 2912 | 2946 | ||
| 2913 | 2947 | ||
| 2914 | #define HDSPM_TX_64(xname, xindex) \ | 2948 | #define HDSPM_TX_64(xname, xindex) \ |
| 2915 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 2949 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 2916 | .name = xname, \ | 2950 | .name = xname, \ |
| 2917 | .index = xindex, \ | 2951 | .index = xindex, \ |
| 2918 | .info = snd_hdspm_info_tx_64, \ | 2952 | .info = snd_hdspm_info_tx_64, \ |
| 2919 | .get = snd_hdspm_get_tx_64, \ | 2953 | .get = snd_hdspm_get_tx_64, \ |
| 2920 | .put = snd_hdspm_put_tx_64 \ | 2954 | .put = snd_hdspm_put_tx_64 \ |
| 2921 | } | 2955 | } |
| 2922 | 2956 | ||
| 2923 | static int hdspm_tx_64(struct hdspm * hdspm) | 2957 | static int hdspm_tx_64(struct hdspm * hdspm) |
| @@ -2968,12 +3002,12 @@ static int snd_hdspm_put_tx_64(struct snd_kcontrol *kcontrol, | |||
| 2968 | 3002 | ||
| 2969 | 3003 | ||
| 2970 | #define HDSPM_C_TMS(xname, xindex) \ | 3004 | #define HDSPM_C_TMS(xname, xindex) \ |
| 2971 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 3005 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 2972 | .name = xname, \ | 3006 | .name = xname, \ |
| 2973 | .index = xindex, \ | 3007 | .index = xindex, \ |
| 2974 | .info = snd_hdspm_info_c_tms, \ | 3008 | .info = snd_hdspm_info_c_tms, \ |
| 2975 | .get = snd_hdspm_get_c_tms, \ | 3009 | .get = snd_hdspm_get_c_tms, \ |
| 2976 | .put = snd_hdspm_put_c_tms \ | 3010 | .put = snd_hdspm_put_c_tms \ |
| 2977 | } | 3011 | } |
| 2978 | 3012 | ||
| 2979 | static int hdspm_c_tms(struct hdspm * hdspm) | 3013 | static int hdspm_c_tms(struct hdspm * hdspm) |
| @@ -3024,12 +3058,12 @@ static int snd_hdspm_put_c_tms(struct snd_kcontrol *kcontrol, | |||
| 3024 | 3058 | ||
| 3025 | 3059 | ||
| 3026 | #define HDSPM_SAFE_MODE(xname, xindex) \ | 3060 | #define HDSPM_SAFE_MODE(xname, xindex) \ |
| 3027 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 3061 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 3028 | .name = xname, \ | 3062 | .name = xname, \ |
| 3029 | .index = xindex, \ | 3063 | .index = xindex, \ |
| 3030 | .info = snd_hdspm_info_safe_mode, \ | 3064 | .info = snd_hdspm_info_safe_mode, \ |
| 3031 | .get = snd_hdspm_get_safe_mode, \ | 3065 | .get = snd_hdspm_get_safe_mode, \ |
| 3032 | .put = snd_hdspm_put_safe_mode \ | 3066 | .put = snd_hdspm_put_safe_mode \ |
| 3033 | } | 3067 | } |
| 3034 | 3068 | ||
| 3035 | static int hdspm_safe_mode(struct hdspm * hdspm) | 3069 | static int hdspm_safe_mode(struct hdspm * hdspm) |
| @@ -3080,12 +3114,12 @@ static int snd_hdspm_put_safe_mode(struct snd_kcontrol *kcontrol, | |||
| 3080 | 3114 | ||
| 3081 | 3115 | ||
| 3082 | #define HDSPM_EMPHASIS(xname, xindex) \ | 3116 | #define HDSPM_EMPHASIS(xname, xindex) \ |
| 3083 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 3117 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 3084 | .name = xname, \ | 3118 | .name = xname, \ |
| 3085 | .index = xindex, \ | 3119 | .index = xindex, \ |
| 3086 | .info = snd_hdspm_info_emphasis, \ | 3120 | .info = snd_hdspm_info_emphasis, \ |
| 3087 | .get = snd_hdspm_get_emphasis, \ | 3121 | .get = snd_hdspm_get_emphasis, \ |
| 3088 | .put = snd_hdspm_put_emphasis \ | 3122 | .put = snd_hdspm_put_emphasis \ |
| 3089 | } | 3123 | } |
| 3090 | 3124 | ||
| 3091 | static int hdspm_emphasis(struct hdspm * hdspm) | 3125 | static int hdspm_emphasis(struct hdspm * hdspm) |
| @@ -3136,12 +3170,12 @@ static int snd_hdspm_put_emphasis(struct snd_kcontrol *kcontrol, | |||
| 3136 | 3170 | ||
| 3137 | 3171 | ||
| 3138 | #define HDSPM_DOLBY(xname, xindex) \ | 3172 | #define HDSPM_DOLBY(xname, xindex) \ |
| 3139 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 3173 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 3140 | .name = xname, \ | 3174 | .name = xname, \ |
| 3141 | .index = xindex, \ | 3175 | .index = xindex, \ |
| 3142 | .info = snd_hdspm_info_dolby, \ | 3176 | .info = snd_hdspm_info_dolby, \ |
| 3143 | .get = snd_hdspm_get_dolby, \ | 3177 | .get = snd_hdspm_get_dolby, \ |
| 3144 | .put = snd_hdspm_put_dolby \ | 3178 | .put = snd_hdspm_put_dolby \ |
| 3145 | } | 3179 | } |
| 3146 | 3180 | ||
| 3147 | static int hdspm_dolby(struct hdspm * hdspm) | 3181 | static int hdspm_dolby(struct hdspm * hdspm) |
| @@ -3192,12 +3226,12 @@ static int snd_hdspm_put_dolby(struct snd_kcontrol *kcontrol, | |||
| 3192 | 3226 | ||
| 3193 | 3227 | ||
| 3194 | #define HDSPM_PROFESSIONAL(xname, xindex) \ | 3228 | #define HDSPM_PROFESSIONAL(xname, xindex) \ |
| 3195 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 3229 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 3196 | .name = xname, \ | 3230 | .name = xname, \ |
| 3197 | .index = xindex, \ | 3231 | .index = xindex, \ |
| 3198 | .info = snd_hdspm_info_professional, \ | 3232 | .info = snd_hdspm_info_professional, \ |
| 3199 | .get = snd_hdspm_get_professional, \ | 3233 | .get = snd_hdspm_get_professional, \ |
| 3200 | .put = snd_hdspm_put_professional \ | 3234 | .put = snd_hdspm_put_professional \ |
| 3201 | } | 3235 | } |
| 3202 | 3236 | ||
| 3203 | static int hdspm_professional(struct hdspm * hdspm) | 3237 | static int hdspm_professional(struct hdspm * hdspm) |
| @@ -3247,12 +3281,12 @@ static int snd_hdspm_put_professional(struct snd_kcontrol *kcontrol, | |||
| 3247 | } | 3281 | } |
| 3248 | 3282 | ||
| 3249 | #define HDSPM_INPUT_SELECT(xname, xindex) \ | 3283 | #define HDSPM_INPUT_SELECT(xname, xindex) \ |
| 3250 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 3284 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 3251 | .name = xname, \ | 3285 | .name = xname, \ |
| 3252 | .index = xindex, \ | 3286 | .index = xindex, \ |
| 3253 | .info = snd_hdspm_info_input_select, \ | 3287 | .info = snd_hdspm_info_input_select, \ |
| 3254 | .get = snd_hdspm_get_input_select, \ | 3288 | .get = snd_hdspm_get_input_select, \ |
| 3255 | .put = snd_hdspm_put_input_select \ | 3289 | .put = snd_hdspm_put_input_select \ |
| 3256 | } | 3290 | } |
| 3257 | 3291 | ||
| 3258 | static int hdspm_input_select(struct hdspm * hdspm) | 3292 | static int hdspm_input_select(struct hdspm * hdspm) |
| @@ -3319,12 +3353,12 @@ static int snd_hdspm_put_input_select(struct snd_kcontrol *kcontrol, | |||
| 3319 | 3353 | ||
| 3320 | 3354 | ||
| 3321 | #define HDSPM_DS_WIRE(xname, xindex) \ | 3355 | #define HDSPM_DS_WIRE(xname, xindex) \ |
| 3322 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 3356 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 3323 | .name = xname, \ | 3357 | .name = xname, \ |
| 3324 | .index = xindex, \ | 3358 | .index = xindex, \ |
| 3325 | .info = snd_hdspm_info_ds_wire, \ | 3359 | .info = snd_hdspm_info_ds_wire, \ |
| 3326 | .get = snd_hdspm_get_ds_wire, \ | 3360 | .get = snd_hdspm_get_ds_wire, \ |
| 3327 | .put = snd_hdspm_put_ds_wire \ | 3361 | .put = snd_hdspm_put_ds_wire \ |
| 3328 | } | 3362 | } |
| 3329 | 3363 | ||
| 3330 | static int hdspm_ds_wire(struct hdspm * hdspm) | 3364 | static int hdspm_ds_wire(struct hdspm * hdspm) |
| @@ -3391,12 +3425,12 @@ static int snd_hdspm_put_ds_wire(struct snd_kcontrol *kcontrol, | |||
| 3391 | 3425 | ||
| 3392 | 3426 | ||
| 3393 | #define HDSPM_QS_WIRE(xname, xindex) \ | 3427 | #define HDSPM_QS_WIRE(xname, xindex) \ |
| 3394 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 3428 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 3395 | .name = xname, \ | 3429 | .name = xname, \ |
| 3396 | .index = xindex, \ | 3430 | .index = xindex, \ |
| 3397 | .info = snd_hdspm_info_qs_wire, \ | 3431 | .info = snd_hdspm_info_qs_wire, \ |
| 3398 | .get = snd_hdspm_get_qs_wire, \ | 3432 | .get = snd_hdspm_get_qs_wire, \ |
| 3399 | .put = snd_hdspm_put_qs_wire \ | 3433 | .put = snd_hdspm_put_qs_wire \ |
| 3400 | } | 3434 | } |
| 3401 | 3435 | ||
| 3402 | static int hdspm_qs_wire(struct hdspm * hdspm) | 3436 | static int hdspm_qs_wire(struct hdspm * hdspm) |
| @@ -3563,15 +3597,15 @@ static int snd_hdspm_put_madi_speedmode(struct snd_kcontrol *kcontrol, | |||
| 3563 | } | 3597 | } |
| 3564 | 3598 | ||
| 3565 | #define HDSPM_MIXER(xname, xindex) \ | 3599 | #define HDSPM_MIXER(xname, xindex) \ |
| 3566 | { .iface = SNDRV_CTL_ELEM_IFACE_HWDEP, \ | 3600 | { .iface = SNDRV_CTL_ELEM_IFACE_HWDEP, \ |
| 3567 | .name = xname, \ | 3601 | .name = xname, \ |
| 3568 | .index = xindex, \ | 3602 | .index = xindex, \ |
| 3569 | .device = 0, \ | 3603 | .device = 0, \ |
| 3570 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \ | 3604 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | \ |
| 3571 | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ | 3605 | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ |
| 3572 | .info = snd_hdspm_info_mixer, \ | 3606 | .info = snd_hdspm_info_mixer, \ |
| 3573 | .get = snd_hdspm_get_mixer, \ | 3607 | .get = snd_hdspm_get_mixer, \ |
| 3574 | .put = snd_hdspm_put_mixer \ | 3608 | .put = snd_hdspm_put_mixer \ |
| 3575 | } | 3609 | } |
| 3576 | 3610 | ||
| 3577 | static int snd_hdspm_info_mixer(struct snd_kcontrol *kcontrol, | 3611 | static int snd_hdspm_info_mixer(struct snd_kcontrol *kcontrol, |
| @@ -3670,12 +3704,12 @@ static int snd_hdspm_put_mixer(struct snd_kcontrol *kcontrol, | |||
| 3670 | */ | 3704 | */ |
| 3671 | 3705 | ||
| 3672 | #define HDSPM_PLAYBACK_MIXER \ | 3706 | #define HDSPM_PLAYBACK_MIXER \ |
| 3673 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | 3707 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ |
| 3674 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE | \ | 3708 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE | \ |
| 3675 | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ | 3709 | SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ |
| 3676 | .info = snd_hdspm_info_playback_mixer, \ | 3710 | .info = snd_hdspm_info_playback_mixer, \ |
| 3677 | .get = snd_hdspm_get_playback_mixer, \ | 3711 | .get = snd_hdspm_get_playback_mixer, \ |
| 3678 | .put = snd_hdspm_put_playback_mixer \ | 3712 | .put = snd_hdspm_put_playback_mixer \ |
| 3679 | } | 3713 | } |
| 3680 | 3714 | ||
| 3681 | static int snd_hdspm_info_playback_mixer(struct snd_kcontrol *kcontrol, | 3715 | static int snd_hdspm_info_playback_mixer(struct snd_kcontrol *kcontrol, |
| @@ -3851,12 +3885,17 @@ static int hdspm_sync_in_sync_check(struct hdspm *hdspm) | |||
| 3851 | break; | 3885 | break; |
| 3852 | 3886 | ||
| 3853 | case MADI: | 3887 | case MADI: |
| 3854 | case AES32: | 3888 | status = hdspm_read(hdspm, HDSPM_statusRegister); |
| 3855 | status = hdspm_read(hdspm, HDSPM_statusRegister2); | ||
| 3856 | lock = (status & HDSPM_syncInLock) ? 1 : 0; | 3889 | lock = (status & HDSPM_syncInLock) ? 1 : 0; |
| 3857 | sync = (status & HDSPM_syncInSync) ? 1 : 0; | 3890 | sync = (status & HDSPM_syncInSync) ? 1 : 0; |
| 3858 | break; | 3891 | break; |
| 3859 | 3892 | ||
| 3893 | case AES32: | ||
| 3894 | status = hdspm_read(hdspm, HDSPM_statusRegister2); | ||
| 3895 | lock = (status & 0x100000) ? 1 : 0; | ||
| 3896 | sync = (status & 0x200000) ? 1 : 0; | ||
| 3897 | break; | ||
| 3898 | |||
| 3860 | case MADIface: | 3899 | case MADIface: |
| 3861 | break; | 3900 | break; |
| 3862 | } | 3901 | } |
| @@ -3942,6 +3981,7 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol, | |||
| 3942 | default: | 3981 | default: |
| 3943 | val = hdspm_s1_sync_check(hdspm, ucontrol->id.index-1); | 3982 | val = hdspm_s1_sync_check(hdspm, ucontrol->id.index-1); |
| 3944 | } | 3983 | } |
| 3984 | break; | ||
| 3945 | 3985 | ||
| 3946 | case AIO: | 3986 | case AIO: |
| 3947 | switch (kcontrol->private_value) { | 3987 | switch (kcontrol->private_value) { |
| @@ -3954,6 +3994,7 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol, | |||
| 3954 | default: | 3994 | default: |
| 3955 | val = hdspm_s1_sync_check(hdspm, ucontrol->id.index-1); | 3995 | val = hdspm_s1_sync_check(hdspm, ucontrol->id.index-1); |
| 3956 | } | 3996 | } |
| 3997 | break; | ||
| 3957 | 3998 | ||
| 3958 | case MADI: | 3999 | case MADI: |
| 3959 | switch (kcontrol->private_value) { | 4000 | switch (kcontrol->private_value) { |
| @@ -3966,6 +4007,7 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol, | |||
| 3966 | case 3: /* SYNC_IN */ | 4007 | case 3: /* SYNC_IN */ |
| 3967 | val = hdspm_sync_in_sync_check(hdspm); break; | 4008 | val = hdspm_sync_in_sync_check(hdspm); break; |
| 3968 | } | 4009 | } |
| 4010 | break; | ||
| 3969 | 4011 | ||
| 3970 | case MADIface: | 4012 | case MADIface: |
| 3971 | val = hdspm_madi_sync_check(hdspm); /* MADI */ | 4013 | val = hdspm_madi_sync_check(hdspm); /* MADI */ |
| @@ -3983,6 +4025,7 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol, | |||
| 3983 | val = hdspm_aes_sync_check(hdspm, | 4025 | val = hdspm_aes_sync_check(hdspm, |
| 3984 | kcontrol->private_value-1); | 4026 | kcontrol->private_value-1); |
| 3985 | } | 4027 | } |
| 4028 | break; | ||
| 3986 | 4029 | ||
| 3987 | } | 4030 | } |
| 3988 | 4031 | ||
| @@ -4427,9 +4470,10 @@ static struct snd_kcontrol_new snd_hdspm_controls_madi[] = { | |||
| 4427 | HDSPM_PREF_SYNC_REF("Preferred Sync Reference", 0), | 4470 | HDSPM_PREF_SYNC_REF("Preferred Sync Reference", 0), |
| 4428 | HDSPM_AUTOSYNC_REF("AutoSync Reference", 0), | 4471 | HDSPM_AUTOSYNC_REF("AutoSync Reference", 0), |
| 4429 | HDSPM_SYSTEM_SAMPLE_RATE("System Sample Rate", 0), | 4472 | HDSPM_SYSTEM_SAMPLE_RATE("System Sample Rate", 0), |
| 4473 | HDSPM_AUTOSYNC_SAMPLE_RATE("External Rate", 0), | ||
| 4430 | HDSPM_SYNC_CHECK("WC SyncCheck", 0), | 4474 | HDSPM_SYNC_CHECK("WC SyncCheck", 0), |
| 4431 | HDSPM_SYNC_CHECK("MADI SyncCheck", 1), | 4475 | HDSPM_SYNC_CHECK("MADI SyncCheck", 1), |
| 4432 | HDSPM_SYNC_CHECK("TCO SyncCHeck", 2), | 4476 | HDSPM_SYNC_CHECK("TCO SyncCheck", 2), |
| 4433 | HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 3), | 4477 | HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 3), |
| 4434 | HDSPM_LINE_OUT("Line Out", 0), | 4478 | HDSPM_LINE_OUT("Line Out", 0), |
| 4435 | HDSPM_TX_64("TX 64 channels mode", 0), | 4479 | HDSPM_TX_64("TX 64 channels mode", 0), |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 2b2dadc54dac..3fddc7ad1127 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
| @@ -1045,6 +1045,7 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w, | |||
| 1045 | struct snd_kcontrol *kcontrol, int event) | 1045 | struct snd_kcontrol *kcontrol, int event) |
| 1046 | { | 1046 | { |
| 1047 | struct snd_soc_codec *codec = w->codec; | 1047 | struct snd_soc_codec *codec = w->codec; |
| 1048 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | ||
| 1048 | struct wm8994 *control = codec->control_data; | 1049 | struct wm8994 *control = codec->control_data; |
| 1049 | int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; | 1050 | int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; |
| 1050 | int i; | 1051 | int i; |
| @@ -1063,6 +1064,10 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w, | |||
| 1063 | 1064 | ||
| 1064 | switch (event) { | 1065 | switch (event) { |
| 1065 | case SND_SOC_DAPM_PRE_PMU: | 1066 | case SND_SOC_DAPM_PRE_PMU: |
| 1067 | /* Don't enable timeslot 2 if not in use */ | ||
| 1068 | if (wm8994->channels[0] <= 2) | ||
| 1069 | mask &= ~(WM8994_AIF1DAC2L_ENA | WM8994_AIF1DAC2R_ENA); | ||
| 1070 | |||
| 1066 | val = snd_soc_read(codec, WM8994_AIF1_CONTROL_1); | 1071 | val = snd_soc_read(codec, WM8994_AIF1_CONTROL_1); |
| 1067 | if ((val & WM8994_AIF1ADCL_SRC) && | 1072 | if ((val & WM8994_AIF1ADCL_SRC) && |
| 1068 | (val & WM8994_AIF1ADCR_SRC)) | 1073 | (val & WM8994_AIF1ADCR_SRC)) |
| @@ -2687,7 +2692,7 @@ static int wm8994_hw_params(struct snd_pcm_substream *substream, | |||
| 2687 | return -EINVAL; | 2692 | return -EINVAL; |
| 2688 | } | 2693 | } |
| 2689 | 2694 | ||
| 2690 | bclk_rate = params_rate(params) * 4; | 2695 | bclk_rate = params_rate(params); |
| 2691 | switch (params_format(params)) { | 2696 | switch (params_format(params)) { |
| 2692 | case SNDRV_PCM_FORMAT_S16_LE: | 2697 | case SNDRV_PCM_FORMAT_S16_LE: |
| 2693 | bclk_rate *= 16; | 2698 | bclk_rate *= 16; |
| @@ -2708,6 +2713,17 @@ static int wm8994_hw_params(struct snd_pcm_substream *substream, | |||
| 2708 | return -EINVAL; | 2713 | return -EINVAL; |
| 2709 | } | 2714 | } |
| 2710 | 2715 | ||
| 2716 | wm8994->channels[id] = params_channels(params); | ||
| 2717 | switch (params_channels(params)) { | ||
| 2718 | case 1: | ||
| 2719 | case 2: | ||
| 2720 | bclk_rate *= 2; | ||
| 2721 | break; | ||
| 2722 | default: | ||
| 2723 | bclk_rate *= 4; | ||
| 2724 | break; | ||
| 2725 | } | ||
| 2726 | |||
| 2711 | /* Try to find an appropriate sample rate; look for an exact match. */ | 2727 | /* Try to find an appropriate sample rate; look for an exact match. */ |
| 2712 | for (i = 0; i < ARRAY_SIZE(srs); i++) | 2728 | for (i = 0; i < ARRAY_SIZE(srs); i++) |
| 2713 | if (srs[i].rate == params_rate(params)) | 2729 | if (srs[i].rate == params_rate(params)) |
diff --git a/sound/soc/codecs/wm8994.h b/sound/soc/codecs/wm8994.h index f142ec198db3..ccbce5791e95 100644 --- a/sound/soc/codecs/wm8994.h +++ b/sound/soc/codecs/wm8994.h | |||
| @@ -77,6 +77,7 @@ struct wm8994_priv { | |||
| 77 | int sysclk_rate[2]; | 77 | int sysclk_rate[2]; |
| 78 | int mclk[2]; | 78 | int mclk[2]; |
| 79 | int aifclk[2]; | 79 | int aifclk[2]; |
| 80 | int channels[2]; | ||
| 80 | struct wm8994_fll_config fll[2], fll_suspend[2]; | 81 | struct wm8994_fll_config fll[2], fll_suspend[2]; |
| 81 | struct completion fll_locked[2]; | 82 | struct completion fll_locked[2]; |
| 82 | bool fll_locked_irq; | 83 | bool fll_locked_irq; |
diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index 356611d9654d..54f7e25b6f7d 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c | |||
| @@ -57,6 +57,20 @@ static struct snd_soc_card mop500_card = { | |||
| 57 | .num_links = ARRAY_SIZE(mop500_dai_links), | 57 | .num_links = ARRAY_SIZE(mop500_dai_links), |
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | static void mop500_of_node_put(void) | ||
| 61 | { | ||
| 62 | int i; | ||
| 63 | |||
| 64 | for (i = 0; i < 2; i++) { | ||
| 65 | if (mop500_dai_links[i].cpu_of_node) | ||
| 66 | of_node_put((struct device_node *) | ||
| 67 | mop500_dai_links[i].cpu_of_node); | ||
| 68 | if (mop500_dai_links[i].codec_of_node) | ||
| 69 | of_node_put((struct device_node *) | ||
| 70 | mop500_dai_links[i].codec_of_node); | ||
| 71 | } | ||
| 72 | } | ||
| 73 | |||
| 60 | static int __devinit mop500_of_probe(struct platform_device *pdev, | 74 | static int __devinit mop500_of_probe(struct platform_device *pdev, |
| 61 | struct device_node *np) | 75 | struct device_node *np) |
| 62 | { | 76 | { |
| @@ -69,6 +83,7 @@ static int __devinit mop500_of_probe(struct platform_device *pdev, | |||
| 69 | 83 | ||
| 70 | if (!(msp_np[0] && msp_np[1] && codec_np)) { | 84 | if (!(msp_np[0] && msp_np[1] && codec_np)) { |
| 71 | dev_err(&pdev->dev, "Phandle missing or invalid\n"); | 85 | dev_err(&pdev->dev, "Phandle missing or invalid\n"); |
| 86 | mop500_of_node_put(); | ||
| 72 | return -EINVAL; | 87 | return -EINVAL; |
| 73 | } | 88 | } |
| 74 | 89 | ||
| @@ -83,6 +98,7 @@ static int __devinit mop500_of_probe(struct platform_device *pdev, | |||
| 83 | 98 | ||
| 84 | return 0; | 99 | return 0; |
| 85 | } | 100 | } |
| 101 | |||
| 86 | static int __devinit mop500_probe(struct platform_device *pdev) | 102 | static int __devinit mop500_probe(struct platform_device *pdev) |
| 87 | { | 103 | { |
| 88 | struct device_node *np = pdev->dev.of_node; | 104 | struct device_node *np = pdev->dev.of_node; |
| @@ -128,6 +144,7 @@ static int __devexit mop500_remove(struct platform_device *pdev) | |||
| 128 | 144 | ||
| 129 | snd_soc_unregister_card(mop500_card); | 145 | snd_soc_unregister_card(mop500_card); |
| 130 | mop500_ab8500_remove(mop500_card); | 146 | mop500_ab8500_remove(mop500_card); |
| 147 | mop500_of_node_put(); | ||
| 131 | 148 | ||
| 132 | return 0; | 149 | return 0; |
| 133 | } | 150 | } |
diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c index b7c996e77570..a26c6bf0a29b 100644 --- a/sound/soc/ux500/ux500_msp_i2s.c +++ b/sound/soc/ux500/ux500_msp_i2s.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/pinctrl/consumer.h> | 18 | #include <linux/pinctrl/consumer.h> |
| 19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
| 20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
| 21 | #include <linux/io.h> | ||
| 21 | #include <linux/of.h> | 22 | #include <linux/of.h> |
| 22 | 23 | ||
| 23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
| @@ -697,14 +698,11 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev, | |||
| 697 | platform_data = devm_kzalloc(&pdev->dev, | 698 | platform_data = devm_kzalloc(&pdev->dev, |
| 698 | sizeof(struct msp_i2s_platform_data), GFP_KERNEL); | 699 | sizeof(struct msp_i2s_platform_data), GFP_KERNEL); |
| 699 | if (!platform_data) | 700 | if (!platform_data) |
| 700 | ret = -ENOMEM; | 701 | return -ENOMEM; |
| 701 | } | 702 | } |
| 702 | } else | 703 | } else |
| 703 | if (!platform_data) | 704 | if (!platform_data) |
| 704 | ret = -EINVAL; | 705 | return -EINVAL; |
| 705 | |||
| 706 | if (ret) | ||
| 707 | goto err_res; | ||
| 708 | 706 | ||
| 709 | dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__, | 707 | dev_dbg(&pdev->dev, "%s: Enter (name: %s, id: %d).\n", __func__, |
| 710 | pdev->name, platform_data->id); | 708 | pdev->name, platform_data->id); |
