From: Lars-Peter Clausen <lars@metafoo.de>
To: Sangbeom Kim <sbkim73@samsung.com>
Cc: alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com,
Sangsu Park <sangsu4u.park@samsung.com>,
lrg@slimlogic.co.uk
Subject: Re: [PATCH] ASoC: Allocate PCM operations dynamically to support multiple DAIs
Date: Fri, 23 Dec 2011 12:36:15 +0100 [thread overview]
Message-ID: <4EF467AF.6070603@metafoo.de> (raw)
In-Reply-To: <1324599996-19661-1-git-send-email-sbkim73@samsung.com>
On 12/23/2011 01:26 AM, Sangbeom Kim wrote:
> From: Sangsu Park <sangsu4u.park@samsung.com>
>
> The original code does not cover the case that two DAIs(CPU) have different
> ASoC core PCM operations(like mmap, pointer...). Currently we have only one
> global soc_pcm_ops for ASoC core PCM operation. When two DAIs have different
> pointer functions, second DAI's pointer function is set for both first DAI
> and second DAI in case of original code.
>
> This patch allocates ASoC core PCM operations dynamically for each DAIs. So
> each DAIs can have different ASoC core PCM operations. This is needed to
> support multiple DAIs.
>
> Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com>
> Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> ---
> sound/core/pcm.c | 1 +
> sound/soc/soc-pcm.c | 44 ++++++++++++++++++++++++--------------------
> 2 files changed, 25 insertions(+), 20 deletions(-)
>
> diff --git a/sound/core/pcm.c b/sound/core/pcm.c
> index 8928ca8..15cf27a 100644
> --- a/sound/core/pcm.c
> +++ b/sound/core/pcm.c
> @@ -769,6 +769,7 @@ static void snd_pcm_free_stream(struct snd_pcm_str * pstr)
> substream_next = substream->next;
> snd_pcm_timer_done(substream);
> snd_pcm_substream_proc_done(substream);
> + kfree(substream->ops);
This looks wrong. It will probably cause regression for all non ASoC sound
card drivers.
The issue this patch addresses came up before and I think the conclusion was
that it is best to embed the snd_pcm_ops struct into the snd_soc_pcm_runtime
struct.
next prev parent reply other threads:[~2011-12-23 11:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-23 0:26 [PATCH] ASoC: Allocate PCM operations dynamically to support multiple DAIs Sangbeom Kim
2011-12-23 11:36 ` Lars-Peter Clausen [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-12-23 1:37 Sangbeom Kim
2011-12-23 9:42 ` Liam Girdwood
2011-12-23 10:21 ` Mark Brown
2011-12-23 10:24 ` Mark Brown
2011-12-27 7:49 Sangsu Park
2011-12-27 10:34 ` Mark Brown
2011-12-27 8:06 Sangsu Park
2011-12-27 10:40 ` Mark Brown
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=4EF467AF.6070603@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=sangsu4u.park@samsung.com \
--cc=sbkim73@samsung.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).