aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/amd/acp-da7219-max98357a.c
AgeCommit message (Collapse)Author
2019-05-02ASoC: AMD: Configure wclk and bclk of master codecAgrawal, Akshu
With CCF support in da7219, we can now set the correct rate of wclk and bclk. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-25ASoC: AMD: Fix incorrect externAndi Kleen
When using bare externs outside include files that types should at least match. This fixes a type confusion between bool and int. Cc: broonie@kernel.org Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-21ASoC: AMD: Update DA7219 DAI clock name to align with codec updatesAdam Thomson
As the DAI clocks for DA7219 have now been split into BCLK and WCLK, the clock lookup name needs to be udpated here to select BCLK to achieve the same functionality as before with regards to DAI clock gating. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-05ASoC: AMD: constify regulator_desc structureJulia Lawall
The regulator_desc structure can be const as it is only passed as the second argument of devm_regulator_register and the corresponding parameter is declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-10-15ASoC: AMD: Add SND_JACK_LINEOUT jack typeAkshu Agrawal
Some 3 pole connectors report impedance greater than threshold of 1000Ohm. Thus, da7219 reports them as LINEOUT. Adding the SND_JACK_LINEOUT type so that we don't fail to detect any 3 pole jack type. Also, changing SND_JACK_HEADPHONE | SND_JACK_MICROPHONE -> SND_JACK_HEADSET Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-10ASoC: AMD: Fix simultaneous playback and capture on different channelAkshu Agrawal
If capture and playback are started on different channel (I2S/BT) there is a possibilty that channel information passed from machine driver is overwritten before the configuration is done in dma driver. Example: 113.597588: cz_max_startup: ---playback sets BT channel 113.597694: cz_dmic1_startup: ---capture sets I2S channel 113.597979: acp_dma_hw_params: ---configures capture for I2S channel 113.598114: acp_dma_hw_params: ---configures playback for I2S channel This is fixed by having 2 separate instance for playback and capture. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: AMD: Change MCLK to 48MhzAkshu Agrawal
25Mhz MCLK which was earlier used was of spread type. Thus, we were not getting accurate rate. The 48Mhz system clk is of non-spread type and we are changing to it to get accurate rate. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-28ASoC: AMD: Set constraints for DMIC and MAX98357a codecAkshu Agrawal
We support dual channel, 48Khz. This constraint was set only for da7219. It is being extended to DMIC and MAX98357a. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-26ASoC: AMD: Fix build warningAkshu Agrawal
Fixes sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_probe': sound/soc/amd/acp-da7219-max98357a.c:367:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret); Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-26ASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002Akshu Agrawal
DA7219 for our platform need to be configured for 1.8V. Hence, we add a volatge regulator with supplies of 1.8V in the machine driver. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-22ASoC: AMD: Configure channel 1 or channel 0 for captureAkshu Agrawal
ST/CZ SoC have 2 channels for capture in the I2SSP path. The DMA though these channels is done using the same dma descriptors. We configure the channel and enable it on the basis of channel selected by machine driver. Machine driver knows which codec sits on which channel and thus sends the information to dma driver. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-22ASoC: AMD: Change codec to channel link as per hardware redesignAgrawal, Akshu
This is a correction to match acutal hardware configuration. The hardware configuration looks like: I2S_BT -> SPK(Max) + DMIC(Adau) I2S_SP -> DA7219 Headset No actual products have been shipped with previous configuration. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-21ASoC: amd: dma driver changes for bt i2s instanceMukunda, Vijendar
With in ACP, There are three I2S controllers can be configured/enabled ( I2S SP, I2S MICSP, I2S BT). Default enabled I2S controller instance is I2S SP. This patch provides required changes to support I2S BT controller Instance. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-21ASoC: AMD: Add const to snd_soc_ops instancesAkshu Agrawal
Marking snd_soc_ops instances const Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-21ASoC: AMD: Fix clocks in CZ DA7219 machine driverAkshu Agrawal
System clock on the platform is 25Mhz and not 24Mhz. PLL_OUT for da7219 codec to use DA7219_PLL_FREQ_OUT_98304 as it is for 48KHz SR. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-21ASoC: AMD: Move clk enable from hw_params/free to startup/shutdownAkshu Agrawal
hw_param can be called multiple times and thus we can have more clk enable. The clk may not get diabled due to refcounting. startup/shutdown ensures single clk enable/disable call. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-16ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk staticWei Yongjun
Fixes the following sparse warning: sound/soc/amd/acp-da7219-max98357a.c:46:12: warning: symbol 'da7219_dai_clk' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-16ASoC: AMD: Support headset button on Stoney DA7219Agrawal, Akshu
Adds headset button support. TEST=Tested Volume UP/Down, Play/Pause functionality Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-28ASoC: amd: don't use codec anymoreKuninori Morimoto
commit c88d31153356 ("ASoC: amd: Enable da7219 master clock using common clock framework") is using rtd->codec, but codec is replaced to component. Let's use component Fixes: c88d31153356 ("ASoC: amd: Enable da7219 master clock using common clock framework") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-20ASoC: amd: Enable da7219 master clock using common clock frameworkAkshu Agrawal
DA7219 is clock master for other codecs. DA7219 has exposed clock control by using common clock framework and same is used to enable and disable clock for all codecs in the system. TEST=aplay -D hw:0,0 -vv <file> arecord -D hw:0,0 -f dat -d 5 -vv <file> aplay -D hw:0,1 -vv <file> Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-20ASoC: amd: Use single dai for da7219 playback and captureAkshu Agrawal
BT I2S is a bi-directional dai, we will use the same cpu dai for playback and capture. TEST=aplay -D hw:0,0 -vv <file> arecord -D hw:0,0 -f dat -d 5 -vv <file> Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-19ASoC: amd: acp-da7219-max98357: replace codec to componentKuninori Morimoto
Now we can replace Codec to Component. Let's do it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-16ASoC: AMD: Add machine driver for ST DA7219 MAX98357Akshu Agrawal
The driver is used for AMD board using DA7219 and MAX98357 codec. TEST=Build, apply grunt_mixer_settings: iotools mmio_write32 0xfed80e40 0x040c40c0 iotools mmio_write32 0xfed80e28 0x10000 iotools mmio_write8 0xfed816de 0xc0 aplay -D plughw:0,0 ./sample_48000.wav -vv aplay -D plughw:0,0 ./sample_44100.wav -vv Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>