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