* [PATCH] ASoC: have unique stream_names in codecs
@ 2012-10-05 14:17 Peter Meerwald
2012-10-05 14:47 ` Péter Ujfalusi
0 siblings, 1 reply; 2+ messages in thread
From: Peter Meerwald @ 2012-10-05 14:17 UTC (permalink / raw)
To: alsa-devel; +Cc: Peter Meerwald, broonie, lrg
From: Peter Meerwald <p.meerwald@bct-electronic.com>
for example, there are two 'Capture' stream_names in twl4030, resulting in
twl4030-codec twl4030-codec: ASoC: Failed to create Capture debugfs file
with debug enabled (fails to create two sysfs entries named 'Capture' under
/sys/kernel/debug/asoc/omap3beagle/twl4030-codec/dapm
this patch tries to avoid duplicate stream_names
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
---
sound/soc/codecs/stac9766.c | 4 ++--
sound/soc/codecs/twl4030.c | 4 ++--
sound/soc/codecs/twl6040.c | 2 +-
sound/soc/codecs/uda1380.c | 4 ++--
sound/soc/codecs/wm8753.c | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index 33c0f3d..3379119 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -300,14 +300,14 @@ static struct snd_soc_dai_driver stac9766_dai[] = {
/* stream cababilities */
.playback = {
- .stream_name = "stac9766 analog",
+ .stream_name = "stac9766 playback",
.channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_48000,
.formats = SND_SOC_STD_AC97_FMTS,
},
.capture = {
- .stream_name = "stac9766 analog",
+ .stream_name = "stac9766 capture",
.channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_48000,
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 391fcfc..55582db 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -2172,7 +2172,7 @@ static struct snd_soc_dai_driver twl4030_dai[] = {
.formats = TWL4030_FORMATS,
.sig_bits = 24,},
.capture = {
- .stream_name = "Capture",
+ .stream_name = "HiFi Capture",
.channels_min = 2,
.channels_max = 4,
.rates = TWL4030_RATES,
@@ -2189,7 +2189,7 @@ static struct snd_soc_dai_driver twl4030_dai[] = {
.rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
.capture = {
- .stream_name = "Capture",
+ .stream_name = "Voice Capture",
.channels_min = 1,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index c084c54..6f3a9cf 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -1046,7 +1046,7 @@ static struct snd_soc_dai_driver twl6040_dai[] = {
{
.name = "twl6040-ul",
.capture = {
- .stream_name = "Capture",
+ .stream_name = "Capture UL",
.channels_min = 1,
.channels_max = 2,
.rates = TWL6040_RATES,
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 2502214..d780fe7 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -671,7 +671,7 @@ static struct snd_soc_dai_driver uda1380_dai[] = {
{ /* playback only - dual interface */
.name = "uda1380-hifi-playback",
.playback = {
- .stream_name = "Playback",
+ .stream_name = "Playback Only",
.channels_min = 1,
.channels_max = 2,
.rates = UDA1380_RATES,
@@ -682,7 +682,7 @@ static struct snd_soc_dai_driver uda1380_dai[] = {
{ /* capture only - dual interface*/
.name = "uda1380-hifi-capture",
.capture = {
- .stream_name = "Capture",
+ .stream_name = "Capture Only",
.channels_min = 1,
.channels_max = 2,
.rates = UDA1380_RATES,
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 13bff87..783ac20 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1400,7 +1400,7 @@ static struct snd_soc_dai_driver wm8753_dai[] = {
.formats = WM8753_FORMATS
},
.capture = { /* dummy for fast DAI switching */
- .stream_name = "Capture",
+ .stream_name = "HiFi Capture",
.channels_min = 1,
.channels_max = 2,
.rates = WM8753_RATES,
@@ -1418,7 +1418,7 @@ static struct snd_soc_dai_driver wm8753_dai[] = {
.formats = WM8753_FORMATS,
},
.capture = {
- .stream_name = "Capture",
+ .stream_name = "Voice Capture",
.channels_min = 1,
.channels_max = 2,
.rates = WM8753_RATES,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: have unique stream_names in codecs
2012-10-05 14:17 [PATCH] ASoC: have unique stream_names in codecs Peter Meerwald
@ 2012-10-05 14:47 ` Péter Ujfalusi
0 siblings, 0 replies; 2+ messages in thread
From: Péter Ujfalusi @ 2012-10-05 14:47 UTC (permalink / raw)
To: Peter Meerwald; +Cc: Peter Meerwald, alsa-devel, broonie, lrg
Hi,
On 10/05/2012 05:17 PM, Peter Meerwald wrote:
> From: Peter Meerwald <p.meerwald@bct-electronic.com>
>
> for example, there are two 'Capture' stream_names in twl4030, resulting in
>
> twl4030-codec twl4030-codec: ASoC: Failed to create Capture debugfs file
>
> with debug enabled (fails to create two sysfs entries named 'Capture' under
> /sys/kernel/debug/asoc/omap3beagle/twl4030-codec/dapm
I have already sent patches for twl4040 and twl6040 and they should have been
applied:
twl4030:
http://mailman.alsa-project.org/pipermail/alsa-devel/2012-September/055683.html
twl6040:
http://mailman.alsa-project.org/pipermail/alsa-devel/2012-September/055684.html
http://mailman.alsa-project.org/pipermail/alsa-devel/2012-October/055959.html
Also: if you just change the stream name you might end up with non working
audio since the stream name matching will no longer work.
--
Péter
>
> this patch tries to avoid duplicate stream_names
>
> Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
> ---
> sound/soc/codecs/stac9766.c | 4 ++--
> sound/soc/codecs/twl4030.c | 4 ++--
> sound/soc/codecs/twl6040.c | 2 +-
> sound/soc/codecs/uda1380.c | 4 ++--
> sound/soc/codecs/wm8753.c | 4 ++--
> 5 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
> index 33c0f3d..3379119 100644
> --- a/sound/soc/codecs/stac9766.c
> +++ b/sound/soc/codecs/stac9766.c
> @@ -300,14 +300,14 @@ static struct snd_soc_dai_driver stac9766_dai[] = {
>
> /* stream cababilities */
> .playback = {
> - .stream_name = "stac9766 analog",
> + .stream_name = "stac9766 playback",
> .channels_min = 1,
> .channels_max = 2,
> .rates = SNDRV_PCM_RATE_8000_48000,
> .formats = SND_SOC_STD_AC97_FMTS,
> },
> .capture = {
> - .stream_name = "stac9766 analog",
> + .stream_name = "stac9766 capture",
> .channels_min = 1,
> .channels_max = 2,
> .rates = SNDRV_PCM_RATE_8000_48000,
> diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
> index 391fcfc..55582db 100644
> --- a/sound/soc/codecs/twl4030.c
> +++ b/sound/soc/codecs/twl4030.c
> @@ -2172,7 +2172,7 @@ static struct snd_soc_dai_driver twl4030_dai[] = {
> .formats = TWL4030_FORMATS,
> .sig_bits = 24,},
> .capture = {
> - .stream_name = "Capture",
> + .stream_name = "HiFi Capture",
> .channels_min = 2,
> .channels_max = 4,
> .rates = TWL4030_RATES,
> @@ -2189,7 +2189,7 @@ static struct snd_soc_dai_driver twl4030_dai[] = {
> .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,
> .formats = SNDRV_PCM_FMTBIT_S16_LE,},
> .capture = {
> - .stream_name = "Capture",
> + .stream_name = "Voice Capture",
> .channels_min = 1,
> .channels_max = 2,
> .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000,
> diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
> index c084c54..6f3a9cf 100644
> --- a/sound/soc/codecs/twl6040.c
> +++ b/sound/soc/codecs/twl6040.c
> @@ -1046,7 +1046,7 @@ static struct snd_soc_dai_driver twl6040_dai[] = {
> {
> .name = "twl6040-ul",
> .capture = {
> - .stream_name = "Capture",
> + .stream_name = "Capture UL",
> .channels_min = 1,
> .channels_max = 2,
> .rates = TWL6040_RATES,
> diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
> index 2502214..d780fe7 100644
> --- a/sound/soc/codecs/uda1380.c
> +++ b/sound/soc/codecs/uda1380.c
> @@ -671,7 +671,7 @@ static struct snd_soc_dai_driver uda1380_dai[] = {
> { /* playback only - dual interface */
> .name = "uda1380-hifi-playback",
> .playback = {
> - .stream_name = "Playback",
> + .stream_name = "Playback Only",
> .channels_min = 1,
> .channels_max = 2,
> .rates = UDA1380_RATES,
> @@ -682,7 +682,7 @@ static struct snd_soc_dai_driver uda1380_dai[] = {
> { /* capture only - dual interface*/
> .name = "uda1380-hifi-capture",
> .capture = {
> - .stream_name = "Capture",
> + .stream_name = "Capture Only",
> .channels_min = 1,
> .channels_max = 2,
> .rates = UDA1380_RATES,
> diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
> index 13bff87..783ac20 100644
> --- a/sound/soc/codecs/wm8753.c
> +++ b/sound/soc/codecs/wm8753.c
> @@ -1400,7 +1400,7 @@ static struct snd_soc_dai_driver wm8753_dai[] = {
> .formats = WM8753_FORMATS
> },
> .capture = { /* dummy for fast DAI switching */
> - .stream_name = "Capture",
> + .stream_name = "HiFi Capture",
> .channels_min = 1,
> .channels_max = 2,
> .rates = WM8753_RATES,
> @@ -1418,7 +1418,7 @@ static struct snd_soc_dai_driver wm8753_dai[] = {
> .formats = WM8753_FORMATS,
> },
> .capture = {
> - .stream_name = "Capture",
> + .stream_name = "Voice Capture",
> .channels_min = 1,
> .channels_max = 2,
> .rates = WM8753_RATES,
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-05 14:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-05 14:17 [PATCH] ASoC: have unique stream_names in codecs Peter Meerwald
2012-10-05 14:47 ` Péter Ujfalusi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.