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.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"A bunch of ASoC fixes with a few HD-audio fixes in this pull request.

All fairly small, boring and device-specific fixes, in addition to
MAINTAINERS update for better reviewing"

* tag 'sound-3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda/hdmi - apply Valleyview fix-ups to Cherryview display codec
ALSA: hda/hdmi - set depop_delay for haswell plus
ALSA: hda - restore the gpio led after resume
ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & co
ASoC: pxa-ssp: drop SNDRV_PCM_FMTBIT_S24_LE
ASoC: fsl-esai: Revert .xlate_tdm_slot_mask() support
ASoC: mcasp: Fix implicit BLCK divider setting
ASoC: arizona: Fix TDM slot length handling in arizona_hw_params
ASoC: pcm512x: Correct Digital Playback control names
ASoC: dapm: Fix uninitialized variable in snd_soc_dapm_get_enum_double()
ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset
ASoC: Intel: Wait Baytrail ADSP boot at resume_early stage
ASoC: Intel: Merge Baytrail ADSP suspend_noirq into suspend_late
MAINTAINERS: Add i.MX maintainers and paths to Freescale ASoC entry
ASoC: Intel: Update Baytrail ADSP firmware name

+74 -68
+3
MAINTAINERS
··· 3843 3843 3844 3844 FREESCALE SOC SOUND DRIVERS 3845 3845 M: Timur Tabi <timur@tabi.org> 3846 + M: Nicolin Chen <nicoleotsuka@gmail.com> 3847 + M: Xiubo Li <Li.Xiubo@freescale.com> 3846 3848 L: alsa-devel@alsa-project.org (moderated for non-subscribers) 3847 3849 L: linuxppc-dev@lists.ozlabs.org 3848 3850 S: Maintained 3849 3851 F: sound/soc/fsl/fsl* 3852 + F: sound/soc/fsl/imx* 3850 3853 F: sound/soc/fsl/mpc8610_hpcd.c 3851 3854 3852 3855 FREEVXFS FILESYSTEM
+7 -5
sound/pci/hda/patch_hdmi.c
··· 50 50 #define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec)) 51 51 52 52 #define is_valleyview(codec) ((codec)->vendor_id == 0x80862882) 53 + #define is_cherryview(codec) ((codec)->vendor_id == 0x80862883) 54 + #define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec)) 53 55 54 56 struct hdmi_spec_per_cvt { 55 57 hda_nid_t cvt_nid; ··· 1461 1459 mux_idx); 1462 1460 1463 1461 /* configure unused pins to choose other converters */ 1464 - if (is_haswell_plus(codec) || is_valleyview(codec)) 1462 + if (is_haswell_plus(codec) || is_valleyview_plus(codec)) 1465 1463 intel_not_share_assigned_cvt(codec, per_pin->pin_nid, mux_idx); 1466 1464 1467 1465 snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid); ··· 1600 1598 * and this can make HW reset converter selection on a pin. 1601 1599 */ 1602 1600 if (eld->eld_valid && !old_eld_valid && per_pin->setup) { 1603 - if (is_haswell_plus(codec) || is_valleyview(codec)) { 1601 + if (is_haswell_plus(codec) || 1602 + is_valleyview_plus(codec)) { 1604 1603 intel_verify_pin_cvt_connect(codec, per_pin); 1605 1604 intel_not_share_assigned_cvt(codec, pin_nid, 1606 1605 per_pin->mux_idx); ··· 1782 1779 bool non_pcm; 1783 1780 int pinctl; 1784 1781 1785 - if (is_haswell_plus(codec) || is_valleyview(codec)) { 1782 + if (is_haswell_plus(codec) || is_valleyview_plus(codec)) { 1786 1783 /* Verify pin:cvt selections to avoid silent audio after S3. 1787 1784 * After S3, the audio driver restores pin:cvt selections 1788 1785 * but this can happen before gfx is ready and such selection ··· 2333 2330 intel_haswell_fixup_enable_dp12(codec); 2334 2331 } 2335 2332 2336 - if (is_haswell(codec) || is_valleyview(codec)) { 2333 + if (is_haswell_plus(codec) || is_valleyview_plus(codec)) 2337 2334 codec->depop_delay = 0; 2338 - } 2339 2335 2340 2336 if (hdmi_parse_codec(codec) < 0) { 2341 2337 codec->spec = NULL;
+21 -5
sound/pci/hda/patch_realtek.c
··· 181 181 spec->pll_coef_idx); 182 182 val = snd_hda_codec_read(codec, spec->pll_nid, 0, 183 183 AC_VERB_GET_PROC_COEF, 0); 184 + if (val == -1) 185 + return; 184 186 snd_hda_codec_write(codec, spec->pll_nid, 0, AC_VERB_SET_COEF_INDEX, 185 187 spec->pll_coef_idx); 186 188 snd_hda_codec_write(codec, spec->pll_nid, 0, AC_VERB_SET_PROC_COEF, ··· 2808 2806 static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) 2809 2807 { 2810 2808 int val = alc_read_coef_idx(codec, 0x04); 2809 + if (val == -1) 2810 + return; 2811 2811 if (power_up) 2812 2812 val |= 1 << 11; 2813 2813 else ··· 3268 3264 snd_hda_codec_resume_cache(codec); 3269 3265 alc_inv_dmic_sync(codec, true); 3270 3266 hda_call_check_power_status(codec, 0x01); 3267 + 3268 + /* on some machine, the BIOS will clear the codec gpio data when enter 3269 + * suspend, and won't restore the data after resume, so we restore it 3270 + * in the driver. 3271 + */ 3272 + if (spec->gpio_led) 3273 + snd_hda_codec_write(codec, codec->afg, 0, AC_VERB_SET_GPIO_DATA, 3274 + spec->gpio_led); 3275 + 3271 3276 if (spec->has_alc5505_dsp) 3272 3277 alc5505_dsp_resume(codec); 3273 3278 ··· 5324 5311 if ((alc_get_coef0(codec) & 0x00ff) == 0x017) { 5325 5312 val = alc_read_coef_idx(codec, 0x04); 5326 5313 /* Power up output pin */ 5327 - alc_write_coef_idx(codec, 0x04, val | (1<<11)); 5314 + if (val != -1) 5315 + alc_write_coef_idx(codec, 0x04, val | (1<<11)); 5328 5316 } 5329 5317 5330 5318 if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { 5331 5319 val = alc_read_coef_idx(codec, 0xd); 5332 - if ((val & 0x0c00) >> 10 != 0x1) { 5320 + if (val != -1 && (val & 0x0c00) >> 10 != 0x1) { 5333 5321 /* Capless ramp up clock control */ 5334 5322 alc_write_coef_idx(codec, 0xd, val | (1<<10)); 5335 5323 } 5336 5324 val = alc_read_coef_idx(codec, 0x17); 5337 - if ((val & 0x01c0) >> 6 != 0x4) { 5325 + if (val != -1 && (val & 0x01c0) >> 6 != 0x4) { 5338 5326 /* Class D power on reset */ 5339 5327 alc_write_coef_idx(codec, 0x17, val | (1<<7)); 5340 5328 } 5341 5329 } 5342 5330 5343 5331 val = alc_read_coef_idx(codec, 0xd); /* Class D */ 5344 - alc_write_coef_idx(codec, 0xd, val | (1<<14)); 5332 + if (val != -1) 5333 + alc_write_coef_idx(codec, 0xd, val | (1<<14)); 5345 5334 5346 5335 val = alc_read_coef_idx(codec, 0x4); /* HP */ 5347 - alc_write_coef_idx(codec, 0x4, val | (1<<11)); 5336 + if (val != -1) 5337 + alc_write_coef_idx(codec, 0x4, val | (1<<11)); 5348 5338 } 5349 5339 5350 5340 /*
+4 -2
sound/soc/codecs/arizona.c
··· 1278 1278 else 1279 1279 rates = &arizona_48k_bclk_rates[0]; 1280 1280 1281 + wl = snd_pcm_format_width(params_format(params)); 1282 + 1281 1283 if (tdm_slots) { 1282 1284 arizona_aif_dbg(dai, "Configuring for %d %d bit TDM slots\n", 1283 1285 tdm_slots, tdm_width); ··· 1287 1285 channels = tdm_slots; 1288 1286 } else { 1289 1287 bclk_target = snd_soc_params_to_bclk(params); 1288 + tdm_width = wl; 1290 1289 } 1291 1290 1292 1291 if (chan_limit && chan_limit < channels) { ··· 1322 1319 arizona_aif_dbg(dai, "BCLK %dHz LRCLK %dHz\n", 1323 1320 rates[bclk], rates[bclk] / lrclk); 1324 1321 1325 - wl = snd_pcm_format_width(params_format(params)); 1326 - frame = wl << ARIZONA_AIF1TX_WL_SHIFT | wl; 1322 + frame = wl << ARIZONA_AIF1TX_WL_SHIFT | tdm_width; 1327 1323 1328 1324 reconfig = arizona_aif_cfg_changed(codec, base, bclk, lrclk, frame); 1329 1325
+2 -2
sound/soc/codecs/pcm512x.c
··· 259 259 pcm512x_ramp_step_text); 260 260 261 261 static const struct snd_kcontrol_new pcm512x_controls[] = { 262 - SOC_DOUBLE_R_TLV("Playback Digital Volume", PCM512x_DIGITAL_VOLUME_2, 262 + SOC_DOUBLE_R_TLV("Digital Playback Volume", PCM512x_DIGITAL_VOLUME_2, 263 263 PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, digital_tlv), 264 264 SOC_DOUBLE_TLV("Playback Volume", PCM512x_ANALOG_GAIN_CTRL, 265 265 PCM512x_LAGN_SHIFT, PCM512x_RAGN_SHIFT, 1, 1, analog_tlv), 266 266 SOC_DOUBLE_TLV("Playback Boost Volume", PCM512x_ANALOG_GAIN_BOOST, 267 267 PCM512x_AGBL_SHIFT, PCM512x_AGBR_SHIFT, 1, 0, boost_tlv), 268 - SOC_DOUBLE("Playback Digital Switch", PCM512x_MUTE, PCM512x_RQML_SHIFT, 268 + SOC_DOUBLE("Digital Playback Switch", PCM512x_MUTE, PCM512x_RQML_SHIFT, 269 269 PCM512x_RQMR_SHIFT, 1, 1), 270 270 271 271 SOC_SINGLE("Deemphasis Switch", PCM512x_DSP, PCM512x_DEMP_SHIFT, 1, 1),
+11 -3
sound/soc/davinci/davinci-mcasp.c
··· 403 403 return ret; 404 404 } 405 405 406 - static int davinci_mcasp_set_clkdiv(struct snd_soc_dai *dai, int div_id, int div) 406 + static int __davinci_mcasp_set_clkdiv(struct snd_soc_dai *dai, int div_id, 407 + int div, bool explicit) 407 408 { 408 409 struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(dai); 409 410 ··· 421 420 ACLKXDIV(div - 1), ACLKXDIV_MASK); 422 421 mcasp_mod_bits(mcasp, DAVINCI_MCASP_ACLKRCTL_REG, 423 422 ACLKRDIV(div - 1), ACLKRDIV_MASK); 424 - mcasp->bclk_div = div; 423 + if (explicit) 424 + mcasp->bclk_div = div; 425 425 break; 426 426 427 427 case 2: /* BCLK/LRCLK ratio */ ··· 434 432 } 435 433 436 434 return 0; 435 + } 436 + 437 + static int davinci_mcasp_set_clkdiv(struct snd_soc_dai *dai, int div_id, 438 + int div) 439 + { 440 + return __davinci_mcasp_set_clkdiv(dai, div_id, div, 1); 437 441 } 438 442 439 443 static int davinci_mcasp_set_sysclk(struct snd_soc_dai *dai, int clk_id, ··· 746 738 "Inaccurate BCLK: %u Hz / %u != %u Hz\n", 747 739 mcasp->sysclk_freq, div, bclk_freq); 748 740 } 749 - davinci_mcasp_set_clkdiv(cpu_dai, 1, div); 741 + __davinci_mcasp_set_clkdiv(cpu_dai, 1, div, 0); 750 742 } 751 743 752 744 ret = mcasp_common_hw_param(mcasp, substream->stream,
-1
sound/soc/fsl/Kconfig
··· 49 49 tristate "Enhanced Serial Audio Interface (ESAI) module support" 50 50 select REGMAP_MMIO 51 51 select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n 52 - select SND_SOC_FSL_UTILS 53 52 help 54 53 Say Y if you want to add Enhanced Synchronous Audio Interface 55 54 (ESAI) support for the Freescale CPUs.
-2
sound/soc/fsl/fsl_esai.c
··· 18 18 19 19 #include "fsl_esai.h" 20 20 #include "imx-pcm.h" 21 - #include "fsl_utils.h" 22 21 23 22 #define FSL_ESAI_RATES SNDRV_PCM_RATE_8000_192000 24 23 #define FSL_ESAI_FORMATS (SNDRV_PCM_FMTBIT_S8 | \ ··· 606 607 .hw_params = fsl_esai_hw_params, 607 608 .set_sysclk = fsl_esai_set_dai_sysclk, 608 609 .set_fmt = fsl_esai_set_dai_fmt, 609 - .xlate_tdm_slot_mask = fsl_asoc_xlate_tdm_slot_mask, 610 610 .set_tdm_slot = fsl_esai_set_dai_tdm_slot, 611 611 }; 612 612
+2 -2
sound/soc/intel/sst-acpi.c
··· 246 246 }; 247 247 248 248 static struct sst_acpi_mach baytrail_machines[] = { 249 - { "10EC5640", "byt-rt5640", "intel/fw_sst_0f28.bin-i2s_master" }, 250 - { "193C9890", "byt-max98090", "intel/fw_sst_0f28.bin-i2s_master" }, 249 + { "10EC5640", "byt-rt5640", "intel/fw_sst_0f28.bin-48kHz_i2s_master" }, 250 + { "193C9890", "byt-max98090", "intel/fw_sst_0f28.bin-48kHz_i2s_master" }, 251 251 {} 252 252 }; 253 253
+1 -9
sound/soc/intel/sst-baytrail-ipc.c
··· 817 817 .ops = &sst_byt_ops, 818 818 }; 819 819 820 - int sst_byt_dsp_suspend_noirq(struct device *dev, struct sst_pdata *pdata) 820 + int sst_byt_dsp_suspend_late(struct device *dev, struct sst_pdata *pdata) 821 821 { 822 822 struct sst_byt *byt = pdata->dsp; 823 823 ··· 825 825 sst_dsp_reset(byt->dsp); 826 826 sst_byt_drop_all(byt); 827 827 dev_dbg(byt->dev, "dsp in reset\n"); 828 - 829 - return 0; 830 - } 831 - EXPORT_SYMBOL_GPL(sst_byt_dsp_suspend_noirq); 832 - 833 - int sst_byt_dsp_suspend_late(struct device *dev, struct sst_pdata *pdata) 834 - { 835 - struct sst_byt *byt = pdata->dsp; 836 828 837 829 dev_dbg(byt->dev, "free all blocks and unload fw\n"); 838 830 sst_fw_unload(byt->fw);
-1
sound/soc/intel/sst-baytrail-ipc.h
··· 66 66 int sst_byt_dsp_init(struct device *dev, struct sst_pdata *pdata); 67 67 void sst_byt_dsp_free(struct device *dev, struct sst_pdata *pdata); 68 68 struct sst_dsp *sst_byt_get_dsp(struct sst_byt *byt); 69 - int sst_byt_dsp_suspend_noirq(struct device *dev, struct sst_pdata *pdata); 70 69 int sst_byt_dsp_suspend_late(struct device *dev, struct sst_pdata *pdata); 71 70 int sst_byt_dsp_boot(struct device *dev, struct sst_pdata *pdata); 72 71 int sst_byt_dsp_wait_for_ready(struct device *dev, struct sst_pdata *pdata);
+15 -28
sound/soc/intel/sst-baytrail-pcm.c
··· 59 59 60 60 /* DAI data */ 61 61 struct sst_byt_pcm_data pcm[BYT_PCM_COUNT]; 62 + 63 + /* flag indicating is stream context restore needed after suspend */ 64 + bool restore_stream; 62 65 }; 63 66 64 67 /* this may get called several times by oss emulation */ ··· 187 184 sst_byt_stream_start(byt, pcm_data->stream, 0); 188 185 break; 189 186 case SNDRV_PCM_TRIGGER_RESUME: 190 - schedule_work(&pcm_data->work); 187 + if (pdata->restore_stream == true) 188 + schedule_work(&pcm_data->work); 189 + else 190 + sst_byt_stream_resume(byt, pcm_data->stream); 191 191 break; 192 192 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 193 193 sst_byt_stream_resume(byt, pcm_data->stream); ··· 199 193 sst_byt_stream_stop(byt, pcm_data->stream); 200 194 break; 201 195 case SNDRV_PCM_TRIGGER_SUSPEND: 196 + pdata->restore_stream = false; 202 197 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 203 198 sst_byt_stream_pause(byt, pcm_data->stream); 204 199 break; ··· 411 404 }; 412 405 413 406 #ifdef CONFIG_PM 414 - static int sst_byt_pcm_dev_suspend_noirq(struct device *dev) 415 - { 416 - struct sst_pdata *sst_pdata = dev_get_platdata(dev); 417 - int ret; 418 - 419 - dev_dbg(dev, "suspending noirq\n"); 420 - 421 - /* at this point all streams will be stopped and context saved */ 422 - ret = sst_byt_dsp_suspend_noirq(dev, sst_pdata); 423 - if (ret < 0) { 424 - dev_err(dev, "failed to suspend %d\n", ret); 425 - return ret; 426 - } 427 - 428 - return ret; 429 - } 430 - 431 407 static int sst_byt_pcm_dev_suspend_late(struct device *dev) 432 408 { 433 409 struct sst_pdata *sst_pdata = dev_get_platdata(dev); 410 + struct sst_byt_priv_data *priv_data = dev_get_drvdata(dev); 434 411 int ret; 435 412 436 413 dev_dbg(dev, "suspending late\n"); ··· 425 434 return ret; 426 435 } 427 436 437 + priv_data->restore_stream = true; 438 + 428 439 return ret; 429 440 } 430 441 431 442 static int sst_byt_pcm_dev_resume_early(struct device *dev) 432 443 { 433 444 struct sst_pdata *sst_pdata = dev_get_platdata(dev); 445 + int ret; 434 446 435 447 dev_dbg(dev, "resume early\n"); 436 448 437 449 /* load fw and boot DSP */ 438 - return sst_byt_dsp_boot(dev, sst_pdata); 439 - } 440 - 441 - static int sst_byt_pcm_dev_resume(struct device *dev) 442 - { 443 - struct sst_pdata *sst_pdata = dev_get_platdata(dev); 444 - 445 - dev_dbg(dev, "resume\n"); 450 + ret = sst_byt_dsp_boot(dev, sst_pdata); 451 + if (ret) 452 + return ret; 446 453 447 454 /* wait for FW to finish booting */ 448 455 return sst_byt_dsp_wait_for_ready(dev, sst_pdata); 449 456 } 450 457 451 458 static const struct dev_pm_ops sst_byt_pm_ops = { 452 - .suspend_noirq = sst_byt_pcm_dev_suspend_noirq, 453 459 .suspend_late = sst_byt_pcm_dev_suspend_late, 454 460 .resume_early = sst_byt_pcm_dev_resume_early, 455 - .resume = sst_byt_pcm_dev_resume, 456 461 }; 457 462 458 463 #define SST_BYT_PM_OPS (&sst_byt_pm_ops)
+1 -3
sound/soc/pxa/pxa-ssp.c
··· 765 765 SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ 766 766 SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) 767 767 768 - #define PXA_SSP_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ 769 - SNDRV_PCM_FMTBIT_S24_LE | \ 770 - SNDRV_PCM_FMTBIT_S32_LE) 768 + #define PXA_SSP_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE) 771 769 772 770 static const struct snd_soc_dai_ops pxa_ssp_dai_ops = { 773 771 .startup = pxa_ssp_startup,
+7 -5
sound/soc/soc-dapm.c
··· 2860 2860 struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol); 2861 2861 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 2862 2862 unsigned int reg_val, val; 2863 - int ret = 0; 2864 2863 2865 - if (e->reg != SND_SOC_NOPM) 2866 - ret = soc_dapm_read(dapm, e->reg, &reg_val); 2867 - else 2864 + if (e->reg != SND_SOC_NOPM) { 2865 + int ret = soc_dapm_read(dapm, e->reg, &reg_val); 2866 + if (ret) 2867 + return ret; 2868 + } else { 2868 2869 reg_val = dapm_kcontrol_get_value(kcontrol); 2870 + } 2869 2871 2870 2872 val = (reg_val >> e->shift_l) & e->mask; 2871 2873 ucontrol->value.enumerated.item[0] = snd_soc_enum_val_to_item(e, val); ··· 2877 2875 ucontrol->value.enumerated.item[1] = val; 2878 2876 } 2879 2877 2880 - return ret; 2878 + return 0; 2881 2879 } 2882 2880 EXPORT_SYMBOL_GPL(snd_soc_dapm_get_enum_double); 2883 2881