diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-03-14 14:03:29 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-03-14 14:03:29 +0100 |
commit | ca80e26a5995f078aa442f151b94cf4305e07ac4 (patch) | |
tree | bb1b4a0a6e07f1ed80ff6412eb2a20e621244037 /sound/soc/davinci | |
parent | 028cb68ee3d01f5323493cb3c07ba92b0acb2f03 (diff) | |
parent | d4a6360f19c1c551afcba42be98df04651fab31b (diff) | |
download | lwn-ca80e26a5995f078aa442f151b94cf4305e07ac4.tar.gz lwn-ca80e26a5995f078aa442f151b94cf4305e07ac4.zip |
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')
-rw-r--r-- | sound/soc/davinci/Kconfig | 3 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig index 3736d9aabc56..50ca291cc225 100644 --- a/sound/soc/davinci/Kconfig +++ b/sound/soc/davinci/Kconfig @@ -5,7 +5,7 @@ config SND_DAVINCI_SOC config SND_EDMA_SOC tristate "SoC Audio for Texas Instruments chips using eDMA" - depends on SOC_AM33XX || SOC_AM43XX || ARCH_DAVINCI + depends on TI_EDMA select SND_SOC_GENERIC_DMAENGINE_PCM help Say Y or M here if you want audio support for TI SoC which uses eDMA. @@ -13,6 +13,7 @@ config SND_EDMA_SOC - daVinci devices - AM335x - AM437x/AM438x + - DRA7xx family config SND_DAVINCI_SOC_I2S tristate 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 { u32 fifo_base; struct device *dev; struct snd_pcm_substream *substreams[2]; + unsigned int dai_fmt; /* McASP specific data */ int tdm_slots; @@ -398,6 +399,9 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, bool fs_pol_rising; bool inv_fs = false; + if (!fmt) + return 0; + pm_runtime_get_sync(mcasp->dev); switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_DSP_A: @@ -529,6 +533,8 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG, FSXPOL); mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG, FSRPOL); } + + mcasp->dai_fmt = fmt; out: pm_runtime_put(mcasp->dev); return ret; @@ -1026,6 +1032,10 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream, int period_size = params_period_size(params); int ret; + ret = davinci_mcasp_set_dai_fmt(cpu_dai, mcasp->dai_fmt); + if (ret) + return ret; + /* * If mcasp is BCLK master, and a BCLK divider was not provided by * the machine driver, we need to calculate the ratio. @@ -1517,6 +1527,8 @@ static int mcasp_reparent_fck(struct platform_device *pdev) if (!parent_name) return 0; + dev_warn(&pdev->dev, "Update the bindings to use assigned-clocks!\n"); + gfclk = clk_get(&pdev->dev, "fck"); if (IS_ERR(gfclk)) { dev_err(&pdev->dev, "failed to get fck\n"); |