alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Sangsu Park <sangsu@gmail.com>
To: lars@metafoo.de
Cc: sbkim73@samsung.com, alsa-devel@alsa-project.org,
	broonie@opensource.wolfsonmicro.com, lrg@ti.com,
	sangsu4u.park@samsung.com
Subject: Re: [PATCH] ASoC: Allocate PCM operations dynamically to support multiple DAIs
Date: Tue, 27 Dec 2011 17:06:56 +0900	[thread overview]
Message-ID: <CANh+=Y-xM6hq6N1umMxR4PATBj-OmKkfHoSpnzR5q2kjt2b79g@mail.gmail.com> (raw)

> 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.

Hi, I'm Sangsu Park. (sangsu4u.park@samsung.com)
I'm using gmail because of company's firewall problems...

I agree you, So I've changed some code like follows.
If you like that, I'll make patch version 2nd using that.

//------------------------------------------------------------------------------
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 42ad2db..d1468aa 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -918,6 +918,9 @@ static void soc_remove_dai_link(struct
snd_soc_card *card, int num, int order)
                list_del(&cpu_dai->card_list);
                module_put(cpu_dai->dev->driver->owner);
        }
+
+       /* free the ops memory */
+       if (rtd->ops) kfree(rtd->ops);
 }
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 8aa7cec..4eb793b 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -641,22 +645,23 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
        INIT_DELAYED_WORK(&rtd->delayed_work, close_delayed_work);
        rtd->pcm = pcm;
+       rtd->ops = soc_pcm_ops;
        pcm->private_data = rtd;
        if (platform->driver->ops) {
------------------------------------------------------------------------------//

Thanks.

             reply	other threads:[~2011-12-27  8:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-27  8:06 Sangsu Park [this message]
2011-12-27 10:40 ` [PATCH] ASoC: Allocate PCM operations dynamically to support multiple DAIs Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2011-12-27  7:49 Sangsu Park
2011-12-27 10:34 ` Mark Brown
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-23  0:26 Sangbeom Kim
2011-12-23 11:36 ` Lars-Peter Clausen

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='CANh+=Y-xM6hq6N1umMxR4PATBj-OmKkfHoSpnzR5q2kjt2b79g@mail.gmail.com' \
    --to=sangsu@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lars@metafoo.de \
    --cc=lrg@ti.com \
    --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).