History log of /linux-master/sound/soc/tegra/tegra210_i2s.c
Revision Date Author Comments
# 340d79a1 06-Oct-2023 Rob Herring <robh@kernel.org>

ASoC: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> # for at91
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-1-13a4f0f7fee6@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# e29df600 15-Mar-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: tegra: tegra210_i2s: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20230315150745.67084-155-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# 63c0ec9e 23-Jun-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: tegra: Remove now redundant non_legacy_dai_naming flag

The ASoC core has now been changed to default to the non-legacy DAI
naming, as such drivers using the new scheme no longer need to specify
the non_legacy_dai_naming flag.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220623125250.2355471-43-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 5983a8a4 15-Jun-2022 Sameer Pujar <spujar@nvidia.com>

ASoC: tegra: Fix clock DAI format on Tegra210

I2S reset failures are seen on Tegra210 and later platforms. This indicates
absence of I2S bit clock, which is required to perform the reset operation.
Following failures are seen with I2S based tests on Tegra210 and later:

tegra210-i2s 2901100.i2s: timeout: failed to reset I2S for playback
tegra210-i2s 2901100.i2s: ASoC: PRE_PMU: I2S2 RX event failed: -110
tegra210-i2s 2901100.i2s: timeout: failed to reset I2S for capture
tegra210-i2s 2901100.i2s: ASoC: PRE_PMU: I2S2 TX event failed: -110

The commit d92ad6633fa7 ("ASoC: tegra: Update to use set_fmt_new callback")
regressed I2S functionality on Tegra platforms. Basically it flipped clock
provider and consumer DAI formats. This configures Tegra I2S in consumer
mode by default now and there is none to provide bit clock during loopback
tests. The external codec based tests also fail because both Tegra I2S and
codec I2S get configured in consumer mode.

ASoC core flips the DAI format before calling set_fmt() for CPU DAIs. This
is negated in above commit. Fix this by swapping SND_SOC_DAIFMT_BC_FC and
SND_SOC_DAIFMT_BP_FP switch cases.

Fixes: d92ad6633fa7 ("ASoC: tegra: Update to use set_fmt_new callback")
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/1655280277-4701-1-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 475f2af6 19-May-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: tegra: Rename set_fmt_new back to set_fmt

Now the core has been migrated across to the new direct clock
specification we can move the drivers back to the normal set_fmt
callback.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220519154318.2153729-51-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# d92ad663 19-May-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: tegra: Update to use set_fmt_new callback

As part of updating the core to directly tell drivers if they are clock
provider or consumer update these CPU side drivers to use the new direct
callback.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220519154318.2153729-24-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# f21a9df3 17-Nov-2021 Sameer Pujar <spujar@nvidia.com>

ASoC: tegra: Fix kcontrol put callback in I2S

The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Update
the I2S driver accordingly.

Fixes: c0bfa98349d1 ("ASoC: tegra: Add Tegra210 based I2S driver")
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-9-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 8a2c2fa0 17-Nov-2021 Sameer Pujar <spujar@nvidia.com>

ASoC: tegra: Fix wrong value type in I2S

The enum controls are expected to use enumerated value type.
Update relevant references in control get/put callbacks.

Fixes: c0bfa98349d1 ("ASoC: tegra: Add Tegra210 based I2S driver")
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# c6d152a8 14-Jan-2021 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: tegra: sync parameter naming (rate/sample_bits)

This patch syncs naming rule.

- xxx_rates;
+ xxx_rate;

- xxx_samplebits;
+ xxx_sample_bits;

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8hqoli4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0246c6cb 01-Nov-2020 Tom Rix <trix@redhat.com>

ASoC: tegra: remove unneeded semicolon

A semicolon is not needed after a switch statement.

Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/20201101172412.2306144-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 823279c3 03-Aug-2020 Takashi Iwai <tiwai@suse.de>

ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=n

Fix trivial compile warnings wrt unused functions by adding
__maybe_unused prefix:
sound/soc/tegra/tegra210_i2s.c:167:12: warning: 'tegra210_i2s_runtime_suspend' defined but not used [-Wunused-function]
sound/soc/tegra/tegra210_i2s.c:179:12: warning: 'tegra210_i2s_runtime_resume' defined but not used [-Wunused-function]

Fixes: c0bfa98349d1 ("ASoC: tegra: Add Tegra210 based I2S driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200803141850.23713-6-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>


# c0bfa983 18-Jul-2020 Sameer Pujar <spujar@nvidia.com>

ASoC: tegra: Add Tegra210 based I2S driver

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>