All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ALSA: pcm: Add debug-print helper function
@ 2012-05-24 13:24 Ola Lilja
  0 siblings, 0 replies; 4+ messages in thread
From: Ola Lilja @ 2012-05-24 13:24 UTC (permalink / raw)
  To: alsa-devel; +Cc: Ola Lilja, Linus Walleij, Mark Brown, Liam Girdwood

Adds a function getting the stream-name as a string for
a specific stream.

Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
---
 include/sound/pcm.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 0d11128..a55d5db 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1073,4 +1073,15 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
 
 const char *snd_pcm_format_name(snd_pcm_format_t format);
 
+/**
+ * Get a string naming the direction of a stream
+ */
+static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
+{
+	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+		return "Playback";
+	else
+		return "Capture";
+}
+
 #endif /* __SOUND_PCM_H */
-- 
1.7.8.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 1/5] ALSA: pcm: Add debug-print helper function
@ 2012-05-24 13:26 Ola Lilja
  2012-05-25  6:19 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Ola Lilja @ 2012-05-24 13:26 UTC (permalink / raw)
  To: Takashi Iwai, alsa-devel
  Cc: Ola Lilja, Linus Walleij, Mark Brown, Liam Girdwood

Adds a function getting the stream-name as a string for
a specific stream.

Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
---
 include/sound/pcm.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 0d11128..a55d5db 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1073,4 +1073,15 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
 
 const char *snd_pcm_format_name(snd_pcm_format_t format);
 
+/**
+ * Get a string naming the direction of a stream
+ */
+static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
+{
+	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+		return "Playback";
+	else
+		return "Capture";
+}
+
 #endif /* __SOUND_PCM_H */
-- 
1.7.8.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/5] ALSA: pcm: Add debug-print helper function
  2012-05-24 13:26 [PATCH 1/5] ALSA: pcm: Add debug-print helper function Ola Lilja
@ 2012-05-25  6:19 ` Takashi Iwai
  2012-05-28  9:45   ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2012-05-25  6:19 UTC (permalink / raw)
  To: Ola Lilja; +Cc: alsa-devel, Mark Brown, Linus Walleij, Liam Girdwood

At Thu, 24 May 2012 15:26:03 +0200,
Ola Lilja wrote:
> 
> Adds a function getting the stream-name as a string for
> a specific stream.
> 
> Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>

Reviewed-by: Takashi Iwai <tiwai@suse.de>

Mark, Liam, feel free to pick it through your tree.


thanks,

Takashi

> ---
>  include/sound/pcm.h |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/include/sound/pcm.h b/include/sound/pcm.h
> index 0d11128..a55d5db 100644
> --- a/include/sound/pcm.h
> +++ b/include/sound/pcm.h
> @@ -1073,4 +1073,15 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
>  
>  const char *snd_pcm_format_name(snd_pcm_format_t format);
>  
> +/**
> + * Get a string naming the direction of a stream
> + */
> +static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
> +{
> +	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
> +		return "Playback";
> +	else
> +		return "Capture";
> +}
> +
>  #endif /* __SOUND_PCM_H */
> -- 
> 1.7.8.3
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/5] ALSA: pcm: Add debug-print helper function
  2012-05-25  6:19 ` Takashi Iwai
@ 2012-05-28  9:45   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-05-28  9:45 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Ola Lilja, alsa-devel, Linus Walleij, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 321 bytes --]

On Fri, May 25, 2012 at 08:19:44AM +0200, Takashi Iwai wrote:
> At Thu, 24 May 2012 15:26:03 +0200,
> Ola Lilja wrote:

> > Adds a function getting the stream-name as a string for
> > a specific stream.

> Reviewed-by: Takashi Iwai <tiwai@suse.de>

> Mark, Liam, feel free to pick it through your tree.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-28  9:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-24 13:26 [PATCH 1/5] ALSA: pcm: Add debug-print helper function Ola Lilja
2012-05-25  6:19 ` Takashi Iwai
2012-05-28  9:45   ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2012-05-24 13:24 Ola Lilja

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.