From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Ola Lilja <ola.o.lilja@stericsson.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org,
Liam Girdwood <lrg@ti.com>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 01/11] sound: core: Add debug-print helper function
Date: Tue, 8 May 2012 15:08:03 +0100 [thread overview]
Message-ID: <20120508140802.GS15893@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1336485385-27077-1-git-send-email-ola.o.lilja@stericsson.com>
[-- Attachment #1.1: Type: text/plain, Size: 1668 bytes --]
On Tue, May 08, 2012 at 03:56:25PM +0200, Ola Lilja wrote:
> Adds a function getting the stream-name as a string for
> a specific stream.
Adding Takashi as this is an ALSA core thing. Always CC maintainers on
patches and always try to use subject lines matching the standard for
the subsystem. Not cutting any text for his benefit.
>
> Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
> ---
> include/sound/pcm.h | 2 ++
> sound/core/pcm.c | 10 ++++++++++
> 2 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/include/sound/pcm.h b/include/sound/pcm.h
> index 0d11128..8a153e6 100644
> --- a/include/sound/pcm.h
> +++ b/include/sound/pcm.h
> @@ -1073,4 +1073,6 @@ 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);
>
> +const char *snd_pcm_stream_str(struct snd_pcm_substream *substream);
> +
> #endif /* __SOUND_PCM_H */
> diff --git a/sound/core/pcm.c b/sound/core/pcm.c
> index 1a3070b..9e83f00 100644
> --- a/sound/core/pcm.c
> +++ b/sound/core/pcm.c
> @@ -1187,6 +1187,16 @@ static void snd_pcm_proc_done(void)
> #define snd_pcm_proc_done()
> #endif /* CONFIG_PROC_FS */
>
> +/**
> + * Get a string naming the direction of a stream
> + */
> +const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
> +{
> + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
> + return "Playback";
> + else
> + return "Capture";
> +}
This needs to be exported for modular builds, or perhaps just made a
static inline in the header.
>
> /*
> * ENTRY functions
> --
> 1.7.8.3
>
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
prev parent reply other threads:[~2012-05-08 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 13:56 [PATCH 01/11] sound: core: Add debug-print helper function Ola Lilja
2012-05-08 14:08 ` Mark Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120508140802.GS15893@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=linus.walleij@linaro.org \
--cc=lrg@ti.com \
--cc=ola.o.lilja@stericsson.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.