diff mbox

[RFC,3/3] ASoC: tegra: add .stream_name to CPU DAIs

Message ID 1339024507-5096-3-git-send-email-swarren@wwwdotorg.org
State Not Applicable, archived
Headers show

Commit Message

Stephen Warren June 6, 2012, 11:15 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

This is certainly required if the I2S and SPDIF controllers are converted
to be CODECs, and is probably good practice irrespective.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
I'm not sure if this is technically correct. It's certainly not required
for the drivers to work correctly when they aren't CODECs, but doesn't
appear to harm anything.

Mark, Liam - what are your thoughts on this?

 sound/soc/tegra/tegra20_i2s.c   |    2 ++
 sound/soc/tegra/tegra20_spdif.c |    1 +
 sound/soc/tegra/tegra30_i2s.c   |    2 ++
 3 files changed, 5 insertions(+), 0 deletions(-)

Comments

Mark Brown June 7, 2012, 11:01 p.m. UTC | #1
On Wed, Jun 06, 2012 at 05:15:07PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> This is certainly required if the I2S and SPDIF controllers are converted
> to be CODECs, and is probably good practice irrespective.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> I'm not sure if this is technically correct. It's certainly not required
> for the drivers to work correctly when they aren't CODECs, but doesn't
> appear to harm anything.
> 
> Mark, Liam - what are your thoughts on this?

It's just generally best practice to provide a name for all streams, it
can be used for diagnostics if nothing else.
diff mbox

Patch

diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c
index d67c684..c5fc6b1 100644
--- a/sound/soc/tegra/tegra20_i2s.c
+++ b/sound/soc/tegra/tegra20_i2s.c
@@ -259,12 +259,14 @@  static const struct snd_soc_dai_ops tegra20_i2s_dai_ops = {
 static const struct snd_soc_dai_driver tegra20_i2s_dai_template = {
 	.probe = tegra20_i2s_probe,
 	.playback = {
+		.stream_name = "Playback",
 		.channels_min = 2,
 		.channels_max = 2,
 		.rates = SNDRV_PCM_RATE_8000_96000,
 		.formats = SNDRV_PCM_FMTBIT_S16_LE,
 	},
 	.capture = {
+		.stream_name = "Capture",
 		.channels_min = 2,
 		.channels_max = 2,
 		.rates = SNDRV_PCM_RATE_8000_96000,
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c
index 014eb74..5c33c61 100644
--- a/sound/soc/tegra/tegra20_spdif.c
+++ b/sound/soc/tegra/tegra20_spdif.c
@@ -172,6 +172,7 @@  static struct snd_soc_dai_driver tegra20_spdif_dai = {
 	.name = DRV_NAME,
 	.probe = tegra20_spdif_probe,
 	.playback = {
+		.stream_name = "Playback",
 		.channels_min = 2,
 		.channels_max = 2,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index 7a84e93..b68e27a 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -319,12 +319,14 @@  static struct snd_soc_dai_ops tegra30_i2s_dai_ops = {
 static const struct snd_soc_dai_driver tegra30_i2s_dai_template = {
 	.probe = tegra30_i2s_probe,
 	.playback = {
+		.stream_name = "Playback",
 		.channels_min = 2,
 		.channels_max = 2,
 		.rates = SNDRV_PCM_RATE_8000_96000,
 		.formats = SNDRV_PCM_FMTBIT_S16_LE,
 	},
 	.capture = {
+		.stream_name = "Capture",
 		.channels_min = 2,
 		.channels_max = 2,
 		.rates = SNDRV_PCM_RATE_8000_96000,