Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Slightly a high amount of commits come from Adrian Knoth's HDSPM
driver fixes. Other than that, all small trival fixes or quirks that
are pretty driver-specific."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: wm8994: Only enable extra BCLK cycles when required
ALSA: als3000: check for the kzalloc return value
ALSA: sound/isa/opti9xx/miro.c: eliminate possible double free
ALSA: hda - Fix silent headphone output from Toshiba P200
ALSA: hdspm - Fix coding style in CTL_ELEM macros
ALSA: hdspm - Fix typo in kcontrol element on RME MADI cards
ALSA: hdspm - Fix sync_in detection on AES/AES32
ALSA: hdspm - Fix sync_in reporting on RME MADI cards
ALSA: hdspm - Also report autosync_sample_rate on MADI and MADIface
ALSA: hdspm - Fix reported autosync_sample_rate
ALSA: hdspm - Fix sync check reporting on all RME HDSPM cards
ALSA: hdspm - Report external rate in slave mode on PCI MADI
ALSA: hdspm - Allow DDS/Varispeed to be set from userspace
ALSA: hda - add dock support for Thinkpad T430
ASoC: ux500_msp_i2s: Fix devm_* and return code merge error
ASoC: Ux500: Dispose of device nodes correctly

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