summaryrefslogtreecommitdiff
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: au1x: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-233-3/+3
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/874kq30ysm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: meson: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-234-4/+4
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/875zaj0ysr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: dwc: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-231-1/+1
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/878sff0yt0.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: qcom: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-236-20/+20
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87a6zv0yt5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: atmel: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-235-13/+13
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87blkb0ytd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-2314-29/+29
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87d04r0yth.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: fsl: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-2315-28/+28
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87eep70ytr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: amd: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-236-16/+16
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ft9n0ytv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rockchip: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-235-8/+8
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87h7u30yu1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cirrus: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-232-2/+2
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87imej0yu5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: pxa: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-2312-17/+17
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87k0yz0yua.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-2321-36/+36
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87lfjf0yuf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sh: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-234-11/+11
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87mu3v0yuj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sof: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-234-16/+16
| | | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87o8ob0yun.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: stm: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-232-7/+7
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pn8r0yus.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sunxi: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-232-7/+7
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87r1t70yuw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tegra: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-238-8/+8
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87sgdn0yv1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: ti: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-2310-19/+19
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87tuy30yv5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: ux500: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-232-5/+5
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87v9ij0yv9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: soc-xxx: add asoc_substream_to_rtd()Kuninori Morimoto2020-07-237-57/+57
| | | | | | | | | | | | | | Current soc-xxx are getting rtd from substream by rtd = substream->private_data; But, getting data from "private_data" is very unclear. This patch adds asoc_substream_to_rtd() macro which is easy to understand that rtd from substream. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wo2z0yve.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge series "ASoC: mediatek: mt8183: support machine driver for max98357b" ↵Mark Brown2020-07-222-9/+72
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from Tzung-Bi Shih <tzungbi@google.com>: The series re-uses mt8183-mt6358-ts3a227-max98357.c to support machine driver with max98357b. The 1st patch enables left justified format from mt8183 audio platform. The 2nd patch adds document for the new proposed compatible string for max98357b. The 3rd patch supports machine driver with max98357b and uses left justified format for it. Tzung-Bi Shih (3): ASoC: mediatek: mt8183: support left justified format for I2S ASoC: dt-bindings: mt8183: add compatible string for using max98357b ASoC: mediatek: mt8183: support machine driver with max98357b .../sound/mt8183-mt6358-ts3a227-max98357.txt | 1 + sound/soc/mediatek/mt8183/mt8183-dai-i2s.c | 59 ++++++++++++++++--- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 22 ++++++- 3 files changed, 73 insertions(+), 9 deletions(-) -- 2.28.0.rc0.105.gf9edc3c819-goog
| * ASoC: mediatek: mt8183: support machine driver with max98357bTzung-Bi Shih2020-07-221-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | Supports machine driver with max98357b ("mt8183-mt6358-ts3a227-max98357b"). The key difference from max98357a: max98357b needs to use left justified format. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200720012559.906088-4-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: mediatek: mt8183: support left justified format for I2STzung-Bi Shih2020-07-221-8/+51
| | | | | | | | | | | | | | | | | | | | | | | | MT8183 audio platform supports EIAJ and I2S formats. The code fixed to use I2S format in the past. Supports EIAJ mode via set_fmt ops and preserves to use I2S format as the default format intentionally. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200720012559.906088-2-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge series "SOF IMX fixes" from Daniel Baluta <daniel.baluta@oss.nxp.com>Mark Brown2020-07-224-5/+33
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Daniel Baluta <daniel.baluta@nxp.com>: From: Daniel Baluta <daniel.baluta@nxp.com> This patchseries contains a couple of SOF IMX fixes found during our first IMX SOF release. Daniel Baluta (7): ASoC: SOF: define INFO_ flags in dsp_ops for imx8 ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X ASoC: SOF: topology: Update SAI config bclk/fsync rate ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs sound/soc/sof/imx/imx8.c | 24 +++++++++++++++++++++--- sound/soc/sof/imx/imx8m.c | 4 ++-- sound/soc/sof/pcm.c | 8 ++++++++ sound/soc/sof/topology.c | 2 ++ 4 files changed, 33 insertions(+), 5 deletions(-) -- 2.17.1
| * | ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIsDaniel Baluta2020-07-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixup BE DAI links rate/channels parameters to match any values from topology. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200720072046.8152-8-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: topology: Update SAI config bclk/fsync rateDaniel Baluta2020-07-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These parameters are read from topology file and sent to DSP. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200720072046.8152-7-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8XDaniel Baluta2020-07-221-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With SOF we support 1 ESAI interface and 1 SAI interface. This patch adds SAI1 interface support existing on i.MX8/i.MX8X boards. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200720072046.8152-6-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8MDaniel Baluta2020-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This must match DAI name from topology. Also, sai-port is too generic. Physical DAI port on i.MX8MP is labeled SAI3. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200720072046.8152-5-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8XDaniel Baluta2020-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This must match DAI name from topology. Also, esai-port is too generic as they are 2 ESAIs on i.MX8/i.MX8X boards. SOF integration only uses ESAI0 for now. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200720072046.8152-4-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded valueDaniel Baluta2020-07-222-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change we no longer need to update num_drv when adding new DAI driver. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200720072046.8152-3-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: define INFO_ flags in dsp_ops for imx8Daniel Baluta2020-07-221-0/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the past, the INFO_ flags such as PAUSE/NO_PERIOD_WAKEUP were defined in the SOF PCM core, but that was changed since commit 27e322fabd50 ("ASoC: SOF: define INFO_ flags in dsp_ops") Now these flags must be set in DSP ops. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200720072046.8152-2-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: hdac_hda: fix deadlock after PCM open errorKai Vehmanen2020-07-221-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5bd70440cb0a ("ASoC: soc-dai: revert all changes to DAI startup/shutdown sequence"), introduced a slight change of semantics to DAI startup/shutdown. If startup() returns an error, shutdown() is now called for the DAI. This causes a deadlock in hdac_hda which issues a call to snd_hda_codec_pcm_put() in case open fails. Upon error, soc_pcm_open() will call shutdown(), and pcm_put() ends up getting called twice. Result is a deadlock on pcm->open_mutex, as snd_device_free() gets called from within snd_pcm_open(). Typical task backtrace looks like this: [ 334.244627] snd_pcm_dev_disconnect+0x49/0x340 [snd_pcm] [ 334.244634] __snd_device_disconnect.part.0+0x2c/0x50 [snd] [ 334.244640] __snd_device_free+0x7f/0xc0 [snd] [ 334.244650] snd_hda_codec_pcm_put+0x87/0x120 [snd_hda_codec] [ 334.244660] soc_pcm_open+0x6a0/0xbe0 [snd_soc_core] [ 334.244676] ? dpcm_add_paths.isra.0+0x491/0x590 [snd_soc_core] [ 334.244679] ? kfree+0x9a/0x230 [ 334.244686] dpcm_be_dai_startup+0x255/0x300 [snd_soc_core] [ 334.244695] dpcm_fe_dai_open+0x20e/0xf30 [snd_soc_core] [ 334.244701] ? snd_pcm_hw_rule_muldivk+0x110/0x110 [snd_pcm] [ 334.244709] ? dpcm_be_dai_startup+0x300/0x300 [snd_soc_core] [ 334.244714] ? snd_pcm_attach_substream+0x3c4/0x540 [snd_pcm] [ 334.244719] snd_pcm_open_substream+0x69a/0xb60 [snd_pcm] [ 334.244729] ? snd_pcm_release_substream+0x30/0x30 [snd_pcm] [ 334.244732] ? __mutex_lock_slowpath+0x10/0x10 [ 334.244736] snd_pcm_open+0x1b3/0x3c0 [snd_pcm] Fixes: 5bd70440cb0a ("ASoC: soc-dai: revert all changes to DAI startup/shutdown sequence") Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> BugLink: https://github.com/thesofproject/linux/issues/2159 Link: https://lore.kernel.org/r/20200717101950.3885187-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: hdac_hda: fix memleak on module unloadKai Vehmanen2020-07-221-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hdac_hda remove implementation fails to free the hda codec resources, leading to memleaks at module unload. This gap has been there from the start, commit 6bae5ea94989 ("ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers"). Instead of duplicating the cleanup logic, use the common snd_hda_codec_cleanup_for_unbind() to free the resources. Remove existing code in hdac_hda to cleanup "codec.jackpoll_work" and call to snd_hdac_regmap_exit(), as these are already done in snd_hda_codec_cleanup_for_unbind(). The cleanup is done in ASoC component remove() callback and not in the HDAC bus hdev_detach(). This is done to ensure the codec specific cleanup routines are run before the parent card is freed. Fixes: 6bae5ea94989 ("ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers") Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> BugLink: https://github.com/thesofproject/linux/issues/2195 Link: https://lore.kernel.org/r/20200717101950.3885187-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: hdac_hda: call patch_ops.free() on probe errorKai Vehmanen2020-07-221-2/+5
| | | | | | | | | | | | | | | | | | | | Add error handling for patch_ops in hdac_hda_codec_probe(). Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200717101950.3885187-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: Replace HTTP links with HTTPS onesAlexander A. Klimov2020-07-2221-22/+22
|/ | | | | | | | | | | | | | | | | | | | | | Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200719153822.59788-1-grandmaster@al2klimov.de Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge series "Add ASoC AHUB components for Tegra210 and later" from Sameer ↵Mark Brown2020-07-216-2/+1230
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pujar <spujar@nvidia.com>: Overview ======== Audio Processing Engine (APE) comprises of Audio DMA (ADMA) and Audio Hub (AHUB) unit. AHUB is a collection of hardware accelerators for audio pre-processing and post-processing. It also includes a programmable full crossbar for routing audio data across these accelerators. This series exposes some of these below mentioned HW devices as ASoC components for Tegra platforms from Tegra210 onwards. * ADMAIF : The interface between ADMA and AHUB * XBAR : Crossbar for routing audio samples across various modules * I2S : Inter-IC Sound Controller * DMIC : Digital Microphone * DSPK : Digital Speaker Following is the summary of current series. * Add YAML DT binding documentation for above mentioned modules. * Helper function for ACIF programming is exposed for Tegra210 and later. * Add ASoC driver components for each of the above modules. * Build ACONNECT and ADMA drivers which are essential to realize audio use case. * Add DT entries for above components for Tegra210, Tegra186 and Tegra194. As per the suggestion in [0] audio graph based sound card support is pushed in a separate series. [0] https://lkml.org/lkml/2020/6/27/4 Changelog ========= v4 -> v5 -------- * Common changes - simple-card driver changes are dropped. Changes are migrated to audio graph card and are moved to a separate series as suggested. - '#sound-dai-cells' property is not needed for planned audio graph card Hence dropped from documentation and related DT binding of component drivers. - CIF and DAP DAIs are added for I/O drivers (DMIC, DSPK, I2S) to represent DAI links using audio graph card. Similary DAIs are added in AHUB driver to describe endpoints in audio crossbar. Routing is updated to reflect the same in drivers. v3 -> v4 -------- * [1/23] "ASoC: dt-bindings: tegra: Add DT bindings for Tegra210" - Removed multiple examples and retained one example per doc - Fixed as per inputs on the previous series - Tested bindings with 'make dt_binding_check/dtbs_check' * [2/23] "ASoC: tegra: Add support for CIF programming" - No change * Common changes (for patch [3/10] to [7/10]) - Mixer control overrides, for PCM parameters (rate, channel, bits), in each driver are dropped. - Updated routing as per DPCM usage - Minor changes related to formatting * New changes (patch [8/23] to [18/23] and patch [23/23]) - Based on discussions in following threads DPCM is used for Tegra Audio. https://lkml.org/lkml/2020/2/20/91 https://lkml.org/lkml/2020/4/30/519 - The simple-card driver is used for Tegra Audio and accordingly some enhancements are made in simple-card and core drivers. - Patch [8/23] to [18/23] are related to simple-card and core changes. - Patch [23/23] adds sound card support to realize complete audio path. This is based on simple-card driver with proposed enhancements. - Re-ordered patches depending on above v2 -> v3 -------- * [1/10] "dt-bindings: sound: tegra: add DT binding for AHUB - Updated licence - Removed redundancy w.r.t items/const/enum - Added constraints wherever needed with "pattern" property * [2/10] "ASoC: tegra: add support for CIF programming" - Removed tegra_cif.c - Instead added inline helper function in tegra_cif.h * common changes (for patch [3/10] to [7/10]) - Replace LATE system calls with Normal sleep - Remove explicit RPM suspend in driver remove() call - Use devm_kzalloc() instead of devm_kcalloc() for single element - Replace 'ret' with 'err' for better reading - Consistent error printing style across drivers - Minor formating fixes * [8/10] "arm64: tegra: add AHUB components for few Tegra chips" - no change * [9/10] "arm64: tegra: enable AHUB modules for few Tegra chips" - no change * [10/10] "arm64: defconfig: enable AHUB components for Tegra210 and later" (New patch) - Enables ACONNECT and AHUB components. With this AHUB and components are registered with ASoC core. v1 -> v2 -------- * [1/9] "dt-bindings: sound: tegra: add DT binding for AHUB" - no changes * [2/9] "ASoC: tegra: add support for CIF programming" - removed CIF programming changes for legacy chips. - this patch now exposes helper function for CIF programming, which can be used on Tegra210 later. - later tegra_cif.c can be extended for legacy chips as well. - updated commit message accordingly * [3/9] "ASoC: tegra: add Tegra210 based DMIC driver" - removed unnecessary initialization of 'ret' in probe() * [4/9] "ASoC: tegra: add Tegra210 based I2S driver" - removed unnecessary initialization of 'ret' in probe() - fixed indentation - added consistent bracing for if-else clauses - updated 'rx_fifo_th' type to 'unsigned int' - used BIT() macro for defines like '1 << {x}' in tegra210_i2s.h * [5/9] "ASoC: tegra: add Tegra210 based AHUB driver" - used of_device_get_match_data() to get 'soc_data' and removed explicit of_match_device() - used devm_platform_ioremap_resource() and removed explicit platform_get_resource() - fixed indentation for devm_snd_soc_register_component() - updated commit message - updated commit message to reflect compatible binding for Tegra186 and Tegra194. * [6/9] "ASoC: tegra: add Tegra186 based DSPK driver" - removed unnecessary initialization of 'ret' in probe() - updated 'max_th' to 'unsigned int' - shortened lengthy macro names to avoid wrapping in tegra186_dspk_wr_reg() and to be consistent * [7/9] "ASoC: tegra: add Tegra210 based ADMAIF driver" - used of_device_get_match_data() and removed explicit of_match_device() - used BIT() macro for defines like '1 << {x}' in tegra210_admaif.h - updated commit message to reflect compatible binding for Tegra186 and Tegra194. * [8/9] "arm64: tegra: add AHUB components for few Tegra chips" - no change * [9/9] "arm64: tegra: enable AHUB modules for few Tegra chips" - no change * common changes for patch [3/9] to [7/9] - sorted headers in alphabetical order - moved MODULE_DEVICE_TABLE() right below *_of_match table - removed macro DRV_NAME - removed explicit 'owner' field from platform_driver structure - added 'const' to snd_soc_dai_ops structure Sameer Pujar (11): ASoC: dt-bindings: tegra: Add DT bindings for Tegra210 ASoC: tegra: Add support for CIF programming ASoC: tegra: Add Tegra210 based DMIC driver ASoC: tegra: Add Tegra210 based I2S driver ASoC: tegra: Add Tegra210 based AHUB driver ASoC: tegra: Add Tegra186 based DSPK driver ASoC: tegra: Add Tegra210 based ADMAIF driver arm64: defconfig: Build AHUB component drivers arm64: defconfig: Build ADMA and ACONNECT driver arm64: tegra: Enable ACONNECT, ADMA and AGIC on Jetson Nano arm64: tegra: Add DT binding for AHUB components .../bindings/sound/nvidia,tegra186-dspk.yaml | 83 +++ .../bindings/sound/nvidia,tegra210-admaif.yaml | 111 +++ .../bindings/sound/nvidia,tegra210-ahub.yaml | 136 ++++ .../bindings/sound/nvidia,tegra210-dmic.yaml | 83 +++ .../bindings/sound/nvidia,tegra210-i2s.yaml | 101 +++ arch/arm64/boot/dts/nvidia/tegra186.dtsi | 217 +++++- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 225 +++++- arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 12 + arch/arm64/boot/dts/nvidia/tegra210.dtsi | 140 ++++ arch/arm64/configs/defconfig | 8 + sound/soc/tegra/Kconfig | 56 ++ sound/soc/tegra/Makefile | 10 + sound/soc/tegra/tegra186_dspk.c | 442 +++++++++++ sound/soc/tegra/tegra186_dspk.h | 70 ++ sound/soc/tegra/tegra210_admaif.c | 800 ++++++++++++++++++++ sound/soc/tegra/tegra210_admaif.h | 162 ++++ sound/soc/tegra/tegra210_ahub.c | 676 +++++++++++++++++ sound/soc/tegra/tegra210_ahub.h | 127 ++++ sound/soc/tegra/tegra210_dmic.c | 455 ++++++++++++ sound/soc/tegra/tegra210_dmic.h | 82 +++ sound/soc/tegra/tegra210_i2s.c | 812 +++++++++++++++++++++ sound/soc/tegra/tegra210_i2s.h | 126 ++++ sound/soc/tegra/tegra_cif.h | 65 ++ sound/soc/tegra/tegra_pcm.c | 235 +++++- sound/soc/tegra/tegra_pcm.h | 21 +- 25 files changed, 5251 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml create mode 100644 sound/soc/tegra/tegra186_dspk.c create mode 100644 sound/soc/tegra/tegra186_dspk.h create mode 100644 sound/soc/tegra/tegra210_admaif.c create mode 100644 sound/soc/tegra/tegra210_admaif.h create mode 100644 sound/soc/tegra/tegra210_ahub.c create mode 100644 sound/soc/tegra/tegra210_ahub.h create mode 100644 sound/soc/tegra/tegra210_dmic.c create mode 100644 sound/soc/tegra/tegra210_dmic.h create mode 100644 sound/soc/tegra/tegra210_i2s.c create mode 100644 sound/soc/tegra/tegra210_i2s.h create mode 100644 sound/soc/tegra/tegra_cif.h -- 2.7.4
| * ASoC: tegra: Add Tegra210 based ADMAIF driverSameer Pujar2020-07-216-2/+1230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ADMAIF is the interface between ADMA and AHUB. Each ADMA channel that sends/receives data to/from AHUB must intreface through an ADMAIF channel. ADMA channel sending data to AHUB pairs with an ADMAIF Tx channel and similarly ADMA channel receiving data from AHUB pairs with an ADMAIF Rx channel. Buffer size is configurable for each ADMAIF channel, but currently SW uses default values. This patch registers ADMAIF driver with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes ADMAIF interfaces, which can be used to connect different components in the ASoC layer. Makefile and Kconfig support is added to allow to build the driver. The ADMAIF device can be enabled in the DT via "nvidia,tegra210-admaif" compatible binding. Tegra PCM driver is updated to expose required PCM interfaces and snd_pcm_ops callbacks. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1595134890-16470-8-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: tas2770: Fix reset gpio property nameDan Murphy2020-07-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | Fix the reset property name when allocating the GPIO descriptor. The gpiod_get_optional appends either the -gpio or -gpios suffix to the name. Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200720181202.31000-2-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis ↵Mark Brown2020-07-205-12/+53
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bossart <pierre-louis.bossart@linux.intel.com>: Small patchset to harden the SoundWire machine driver, change bad HIDs, update PLL settings and avoid memory leaks. Given that the SoundWire core parts are not upstream it's probably not necessary to provide the patches to stable branches. Bard Liao (1): ASoC: Intel: sof_sdw_rt711: remove hard-coded codec name Kai Vehmanen (2): ASoC: Intel: sof_sdw: add support for systems without i915 audio ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded Libin Yang (1): ASoC: Intel: common: change match table ehl-rt5660 Pierre-Louis Bossart (1): ASoC: Intel: sof_sdw_rt711: remove properties in card remove Yong Zhi (1): ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freq sound/soc/intel/boards/sof_rt5682.c | 9 +++++- sound/soc/intel/boards/sof_sdw.c | 31 +++++++++++++------ sound/soc/intel/boards/sof_sdw_common.h | 2 ++ sound/soc/intel/boards/sof_sdw_hdmi.c | 6 ++++ sound/soc/intel/boards/sof_sdw_rt711.c | 17 +++++++++- .../intel/common/soc-acpi-intel-ehl-match.c | 2 +- 6 files changed, 54 insertions(+), 13 deletions(-) base-commit: 22e9b54307987787efa0ee534aa9e31982ec1161 -- 2.25.1
| * | ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freqYong Zhi2020-07-201-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit d696a61413b4 ("ASoC: rt1015: Add condition to prevent SoC providing bclk in ratio of 50 times of sample rate."), PLL input at 50fs is no longer supported, the new recommended settings at 48Khz rate are: PLL input SSP bclk ------------------------ 64fs 3.073Mhz 100fs 4.8Mhz (bclk update is reflected in topoplogy.) Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200717211337.31956-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loadedKai Vehmanen2020-07-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mc_private->hdmi_pcm_list is populated by elements loaded during DSP topology load. Valid topologies for this machine driver will always have PCM nodes for HDMI, but driver should fail gracefully even in the case this is not true. Add a sanity check to sof_sdw_hdmi_card_late_probe() for this case. Without the fix, a null pcm handle gets dereferenced. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Link: https://lore.kernel.org/r/20200717211337.31956-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: Intel: sof_sdw: add support for systems without i915 audioKai Vehmanen2020-07-203-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the generic SOF Soundwire machine driver to support systems where iDisp HDMI/DP audio codec is disabled for some reason (i915 driver disabled, HDMI/DP implemented with a discrete GPU, etc). Switch codecs to SoC dummy in the affected DAI links. This allows to reuse existing topologies for this case. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Link: https://lore.kernel.org/r/20200717211337.31956-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: Intel: sof_sdw_rt711: remove properties in card removePierre-Louis Bossart2020-07-203-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rt711 jack detection properties are set from the machine drivers during the card probe, as done in other ASoC examples. KASAN reports a use-after-free error when unbinding drivers due to a confusing sequence between the ACPI core, the device core and the SoundWire device cleanups. Rather than fixing this sequence, follow the recommendation to have the same caller add and remove properties, add an explicit device_remove_properties() in the card .remove() callback. In future patches the use of device_add/remove_properties will be replaced by a direct handling of a swnode, but the sequence will remain the same. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200717211337.31956-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: Intel: sof_sdw_rt711: remove hard-coded codec nameBard Liao2020-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can get codec name from dai link. Suggested-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200717211337.31956-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge series "Add ASoC AHUB components for Tegra210 and later" from Sameer ↵Mark Brown2020-07-2011-0/+2907
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pujar <spujar@nvidia.com>: Overview ======== Audio Processing Engine (APE) comprises of Audio DMA (ADMA) and Audio Hub (AHUB) unit. AHUB is a collection of hardware accelerators for audio pre-processing and post-processing. It also includes a programmable full crossbar for routing audio data across these accelerators. This series exposes some of these below mentioned HW devices as ASoC components for Tegra platforms from Tegra210 onwards. * ADMAIF : The interface between ADMA and AHUB * XBAR : Crossbar for routing audio samples across various modules * I2S : Inter-IC Sound Controller * DMIC : Digital Microphone * DSPK : Digital Speaker Following is the summary of current series. * Add YAML DT binding documentation for above mentioned modules. * Helper function for ACIF programming is exposed for Tegra210 and later. * Add ASoC driver components for each of the above modules. * Build ACONNECT and ADMA drivers which are essential to realize audio use case. * Add DT entries for above components for Tegra210, Tegra186 and Tegra194. As per the suggestion in [0] audio graph based sound card support is pushed in a separate series. [0] https://lkml.org/lkml/2020/6/27/4 Changelog ========= v4 -> v5 -------- * Common changes - simple-card driver changes are dropped. Changes are migrated to audio graph card and are moved to a separate series as suggested. - '#sound-dai-cells' property is not needed for planned audio graph card Hence dropped from documentation and related DT binding of component drivers. - CIF and DAP DAIs are added for I/O drivers (DMIC, DSPK, I2S) to represent DAI links using audio graph card. Similary DAIs are added in AHUB driver to describe endpoints in audio crossbar. Routing is updated to reflect the same in drivers. v3 -> v4 -------- * [1/23] "ASoC: dt-bindings: tegra: Add DT bindings for Tegra210" - Removed multiple examples and retained one example per doc - Fixed as per inputs on the previous series - Tested bindings with 'make dt_binding_check/dtbs_check' * [2/23] "ASoC: tegra: Add support for CIF programming" - No change * Common changes (for patch [3/10] to [7/10]) - Mixer control overrides, for PCM parameters (rate, channel, bits), in each driver are dropped. - Updated routing as per DPCM usage - Minor changes related to formatting * New changes (patch [8/23] to [18/23] and patch [23/23]) - Based on discussions in following threads DPCM is used for Tegra Audio. https://lkml.org/lkml/2020/2/20/91 https://lkml.org/lkml/2020/4/30/519 - The simple-card driver is used for Tegra Audio and accordingly some enhancements are made in simple-card and core drivers. - Patch [8/23] to [18/23] are related to simple-card and core changes. - Patch [23/23] adds sound card support to realize complete audio path. This is based on simple-card driver with proposed enhancements. - Re-ordered patches depending on above v2 -> v3 -------- * [1/10] "dt-bindings: sound: tegra: add DT binding for AHUB - Updated licence - Removed redundancy w.r.t items/const/enum - Added constraints wherever needed with "pattern" property * [2/10] "ASoC: tegra: add support for CIF programming" - Removed tegra_cif.c - Instead added inline helper function in tegra_cif.h * common changes (for patch [3/10] to [7/10]) - Replace LATE system calls with Normal sleep - Remove explicit RPM suspend in driver remove() call - Use devm_kzalloc() instead of devm_kcalloc() for single element - Replace 'ret' with 'err' for better reading - Consistent error printing style across drivers - Minor formating fixes * [8/10] "arm64: tegra: add AHUB components for few Tegra chips" - no change * [9/10] "arm64: tegra: enable AHUB modules for few Tegra chips" - no change * [10/10] "arm64: defconfig: enable AHUB components for Tegra210 and later" (New patch) - Enables ACONNECT and AHUB components. With this AHUB and components are registered with ASoC core. v1 -> v2 -------- * [1/9] "dt-bindings: sound: tegra: add DT binding for AHUB" - no changes * [2/9] "ASoC: tegra: add support for CIF programming" - removed CIF programming changes for legacy chips. - this patch now exposes helper function for CIF programming, which can be used on Tegra210 later. - later tegra_cif.c can be extended for legacy chips as well. - updated commit message accordingly * [3/9] "ASoC: tegra: add Tegra210 based DMIC driver" - removed unnecessary initialization of 'ret' in probe() * [4/9] "ASoC: tegra: add Tegra210 based I2S driver" - removed unnecessary initialization of 'ret' in probe() - fixed indentation - added consistent bracing for if-else clauses - updated 'rx_fifo_th' type to 'unsigned int' - used BIT() macro for defines like '1 << {x}' in tegra210_i2s.h * [5/9] "ASoC: tegra: add Tegra210 based AHUB driver" - used of_device_get_match_data() to get 'soc_data' and removed explicit of_match_device() - used devm_platform_ioremap_resource() and removed explicit platform_get_resource() - fixed indentation for devm_snd_soc_register_component() - updated commit message - updated commit message to reflect compatible binding for Tegra186 and Tegra194. * [6/9] "ASoC: tegra: add Tegra186 based DSPK driver" - removed unnecessary initialization of 'ret' in probe() - updated 'max_th' to 'unsigned int' - shortened lengthy macro names to avoid wrapping in tegra186_dspk_wr_reg() and to be consistent * [7/9] "ASoC: tegra: add Tegra210 based ADMAIF driver" - used of_device_get_match_data() and removed explicit of_match_device() - used BIT() macro for defines like '1 << {x}' in tegra210_admaif.h - updated commit message to reflect compatible binding for Tegra186 and Tegra194. * [8/9] "arm64: tegra: add AHUB components for few Tegra chips" - no change * [9/9] "arm64: tegra: enable AHUB modules for few Tegra chips" - no change * common changes for patch [3/9] to [7/9] - sorted headers in alphabetical order - moved MODULE_DEVICE_TABLE() right below *_of_match table - removed macro DRV_NAME - removed explicit 'owner' field from platform_driver structure - added 'const' to snd_soc_dai_ops structure Sameer Pujar (11): ASoC: dt-bindings: tegra: Add DT bindings for Tegra210 ASoC: tegra: Add support for CIF programming ASoC: tegra: Add Tegra210 based DMIC driver ASoC: tegra: Add Tegra210 based I2S driver ASoC: tegra: Add Tegra210 based AHUB driver ASoC: tegra: Add Tegra186 based DSPK driver ASoC: tegra: Add Tegra210 based ADMAIF driver arm64: defconfig: Build AHUB component drivers arm64: defconfig: Build ADMA and ACONNECT driver arm64: tegra: Enable ACONNECT, ADMA and AGIC on Jetson Nano arm64: tegra: Add DT binding for AHUB components .../bindings/sound/nvidia,tegra186-dspk.yaml | 83 +++ .../bindings/sound/nvidia,tegra210-admaif.yaml | 111 +++ .../bindings/sound/nvidia,tegra210-ahub.yaml | 136 ++++ .../bindings/sound/nvidia,tegra210-dmic.yaml | 83 +++ .../bindings/sound/nvidia,tegra210-i2s.yaml | 101 +++ arch/arm64/boot/dts/nvidia/tegra186.dtsi | 217 +++++- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 225 +++++- arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 12 + arch/arm64/boot/dts/nvidia/tegra210.dtsi | 140 ++++ arch/arm64/configs/defconfig | 8 + sound/soc/tegra/Kconfig | 56 ++ sound/soc/tegra/Makefile | 10 + sound/soc/tegra/tegra186_dspk.c | 442 +++++++++++ sound/soc/tegra/tegra186_dspk.h | 70 ++ sound/soc/tegra/tegra210_admaif.c | 800 ++++++++++++++++++++ sound/soc/tegra/tegra210_admaif.h | 162 ++++ sound/soc/tegra/tegra210_ahub.c | 676 +++++++++++++++++ sound/soc/tegra/tegra210_ahub.h | 127 ++++ sound/soc/tegra/tegra210_dmic.c | 455 ++++++++++++ sound/soc/tegra/tegra210_dmic.h | 82 +++ sound/soc/tegra/tegra210_i2s.c | 812 +++++++++++++++++++++ sound/soc/tegra/tegra210_i2s.h | 126 ++++ sound/soc/tegra/tegra_cif.h | 65 ++ sound/soc/tegra/tegra_pcm.c | 235 +++++- sound/soc/tegra/tegra_pcm.h | 21 +- 25 files changed, 5251 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml create mode 100644 sound/soc/tegra/tegra186_dspk.c create mode 100644 sound/soc/tegra/tegra186_dspk.h create mode 100644 sound/soc/tegra/tegra210_admaif.c create mode 100644 sound/soc/tegra/tegra210_admaif.h create mode 100644 sound/soc/tegra/tegra210_ahub.c create mode 100644 sound/soc/tegra/tegra210_ahub.h create mode 100644 sound/soc/tegra/tegra210_dmic.c create mode 100644 sound/soc/tegra/tegra210_dmic.h create mode 100644 sound/soc/tegra/tegra210_i2s.c create mode 100644 sound/soc/tegra/tegra210_i2s.h create mode 100644 sound/soc/tegra/tegra_cif.h -- 2.7.4
| * | ASoC: tegra: Add Tegra186 based DSPK driverSameer Pujar2020-07-204-0/+527
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Digital Speaker Controller (DSPK) converts the multi-bit Pulse Code Modulation (PCM) audio input to oversampled 1-bit Pulse Density Modulation (PDM) output. From the signal flow perpsective, the DSPK can be viewed as a PDM transmitter that up-samples the input to the desired sampling rate by interpolation then converts the oversampled PCM input to the desired 1-bit output via Delta Sigma Modulation (DSM). This patch registers DSPK component with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes DSPK interfaces, which can be used to connect different components in the ASoC layer. Makefile and Kconfig support is added to allow to build the driver. The DSPK devices can be enabled in the DT via "nvidia,tegra186-dspk" compatible binding. This driver can be used on Tegra194 chip as well. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1595134890-16470-7-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: tegra: Add Tegra210 based AHUB driverSameer Pujar2020-07-204-0/+815
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Audio Hub (AHUB) comprises a collection of hardware accelerators for audio pre/post-processing and a programmable full crossbar (XBAR) for routing audio data across these accelerators in time and in parallel. AHUB supports multiple interfaces to I2S, DSPK, DMIC etc., XBAR is a switch used to configure or modify audio routing between HW accelerators present inside AHUB. This patch registers AHUB component with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes AHUB interfaces, which can be used to connect different components in the ASoC layer. Currently the driver takes care of XBAR programming to allow audio data flow through various clients of the AHUB. Makefile and Kconfig support is added to allow to build the driver. The AHUB component can be enabled in the DT via below compatible bindings. - "nvidia,tegra210-ahub" for Tegra210 - "nvidia,tegra186-ahub" for Tegra186 and Tegra194 Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1595134890-16470-6-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: tegra: Add Tegra210 based I2S driverSameer Pujar2020-07-204-0/+950
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Inter-IC Sound (I2S) controller implements full-duplex, bi-directional and single direction point to point serial interface. It can interface with I2S compatible devices. Tegra I2S controller can operate as both master and slave. This patch registers I2S controller with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes I2S interfaces, which can be used to connect different components in the ASoC layer. Makefile and Kconfig support is added to allow to build the driver. The I2S devices can be enabled in the DT via "nvidia,tegra210-i2s" compatible binding. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1595134890-16470-5-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: tegra: Add Tegra210 based DMIC driverSameer Pujar2020-07-204-0/+550
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Digital MIC (DMIC) Controller is used to interface with Pulse Density Modulation (PDM) input devices. The DMIC controller implements a converter to convert PDM signals to Pulse Code Modulation (PCM) signals. From signal flow perspective, the DMIC can be viewed as a PDM receiver. This patch registers DMIC component with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes DMIC interfaces, which can be used to connect different components in the ASoC layer. Makefile and Kconfig support is added to allow to build the driver. The DMIC devices can be enabled in the DT via "nvidia,tegra210-dmic" compatible string. This driver can be used for Tegra186 and Tegra194 chips as well. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1595134890-16470-4-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: tegra: Add support for CIF programmingSameer Pujar2020-07-201-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Audio Client Interface (CIF) is a proprietary interface employed to route audio samples through Audio Hub (AHUB) components by inter connecting the various modules. This patch exports an inline function tegra_set_cif() which can be used, for now, to program CIF on Tegra210 and later Tegra generations. Later it can be extended to include helpers for legacy chips as well. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/1595134890-16470-3-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>