diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-03-14 09:03:29 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-03-14 09:03:29 -0400 |
commit | ca80e26a5995f078aa442f151b94cf4305e07ac4 (patch) | |
tree | bb1b4a0a6e07f1ed80ff6412eb2a20e621244037 /sound/soc/davinci/davinci-mcasp.c | |
parent | 028cb68ee3d01f5323493cb3c07ba92b0acb2f03 (diff) | |
parent | d4a6360f19c1c551afcba42be98df04651fab31b (diff) |
Merge tag 'asoc-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v4.6
The main thing in terms of the core this time around has been some
additional framework work for dynamic topologies (though we *still*
don't appear to have a stable ABI for the topology code, it's probably
worth considering if this will ever happen...). Otherwise the work has
almost all been in the drivers:
- HDMI support for Sky Lake, along with other fixes and enhancements
for the Intel drivers.
- Lots of improvements to the Renesas drivers.
- Capture support for Qualcomm drivers.
- Support for TI DaVinci DRA7xxx devices.
- New machine drivers for Freescale systems with Cirrus CODECs,
Mediatek systems with RT5650 CODECs.
- New CPU drivers for Allwinner S/PDIF controllers
- New CODEC drivers for Maxim MAX9867 and MAX98926 and Realtek RT5514.
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 2ccb8bccc9d4..e1324989bd6b 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -77,6 +77,7 @@ struct davinci_mcasp { | |||
77 | u32 fifo_base; | 77 | u32 fifo_base; |
78 | struct device *dev; | 78 | struct device *dev; |
79 | struct snd_pcm_substream *substreams[2]; | 79 | struct snd_pcm_substream *substreams[2]; |
80 | unsigned int dai_fmt; | ||
80 | 81 | ||
81 | /* McASP specific data */ | 82 | /* McASP specific data */ |
82 | int tdm_slots; | 83 | int tdm_slots; |
@@ -398,6 +399,9 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
398 | bool fs_pol_rising; | 399 | bool fs_pol_rising; |
399 | bool inv_fs = false; | 400 | bool inv_fs = false; |
400 | 401 | ||
402 | if (!fmt) | ||
403 | return 0; | ||
404 | |||
401 | pm_runtime_get_sync(mcasp->dev); | 405 | pm_runtime_get_sync(mcasp->dev); |
402 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 406 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
403 | case SND_SOC_DAIFMT_DSP_A: | 407 | case SND_SOC_DAIFMT_DSP_A: |
@@ -529,6 +533,8 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
529 | mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXPOL); | 533 | mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXPOL); |
530 | mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRPOL); | 534 | mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRPOL); |
531 | } | 535 | } |
536 | |||
537 | mcasp->dai_fmt = fmt; | ||
532 | out: | 538 | out: |
533 | pm_runtime_put(mcasp->dev); | 539 | pm_runtime_put(mcasp->dev); |
534 | return ret; | 540 | return ret; |
@@ -1026,6 +1032,10 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream, | |||
1026 | int period_size = params_period_size(params); | 1032 | int period_size = params_period_size(params); |
1027 | int ret; | 1033 | int ret; |
1028 | 1034 | ||
1035 | ret = davinci_mcasp_set_dai_fmt(cpu_dai, mcasp->dai_fmt); | ||
1036 | if (ret) | ||
1037 | return ret; | ||
1038 | |||
1029 | /* | 1039 | /* |
1030 | * If mcasp is BCLK master, and a BCLK divider was not provided by | 1040 | * If mcasp is BCLK master, and a BCLK divider was not provided by |
1031 | * the machine driver, we need to calculate the ratio. | 1041 | * the machine driver, we need to calculate the ratio. |
@@ -1517,6 +1527,8 @@ static int mcasp_reparent_fck(struct platform_device *pdev) | |||
1517 | if (!parent_name) | 1527 | if (!parent_name) |
1518 | return 0; | 1528 | return 0; |
1519 | 1529 | ||
1530 | dev_warn(&pdev->dev, "Update the bindings to use assigned-clocks!\n"); | ||
1531 | |||
1520 | gfclk = clk_get(&pdev->dev, "fck"); | 1532 | gfclk = clk_get(&pdev->dev, "fck"); |
1521 | if (IS_ERR(gfclk)) { | 1533 | if (IS_ERR(gfclk)) { |
1522 | dev_err(&pdev->dev, "failed to get fck\n"); | 1534 | dev_err(&pdev->dev, "failed to get fck\n"); |