From: Vinod Koul <vinod.koul@intel.com>
To: Takashi Iwai <tiwai@suse.de>, Mark Brown <broonie@kernel.org>
Cc: "Girdwood, Liam R" <liam.r.girdwood@intel.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"Zhang, Vivian" <vivian.zhang@intel.com>,
"ramesh.babu@intel.com" <ramesh.babu@intel.com>
Subject: Re: [PATCH v2 1/2] ASoC: soc-compress: add a config item for soc-compress
Date: Wed, 17 Jun 2015 08:24:48 +0530 [thread overview]
Message-ID: <20150617025448.GB28601@localhost> (raw)
In-Reply-To: <s5h7fr38vax.wl-tiwai@suse.de>
On Tue, Jun 16, 2015 at 06:36:22PM +0200, Takashi Iwai wrote:
> At Tue, 16 Jun 2015 21:55:07 +0530,
> Vinod Koul wrote:
> >
> > On Tue, Jun 16, 2015 at 06:17:12PM +0200, Takashi Iwai wrote:
> > > At Tue, 16 Jun 2015 18:14:40 +0200,
> > > Takashi Iwai wrote:
> > > >
> > > > At Tue, 16 Jun 2015 17:06:07 +0100,
> > > > Mark Brown wrote:
> > > > >
> > > > > On Tue, Jun 16, 2015 at 12:36:16PM +0000, Jie, Yang wrote:
> > > > >
> > > > > > > OK, that should have been in the commit message.
> > > > >
> > > > > > OK, so let me add it to the commit message and resend?
> > > > >
> > > > > Well, there's still the stubs to consider. Should we really be
> > > > > returning an error or should we silently ignore the error and hide the
> > > > > DAI if the user deconfigured compressed audio? Or rearrange things so
> > > > > we don't need stubs? Given that the machine driver has to select
> > > > > compressed support it's not something that should ever really hit the
> > > > > stubs, it's not truly a runtime thing...
> > > >
> > > > Yes, I guess that leaving without dummy function will give unresolved
> > > > symbol errors at module link time, so the user can catch before
> > > > actually running it. Of course, this should be checked actually.
> > >
> > > Oh, scratch this. It won't work well in the current code.
> > > Possibly with weak linking, but...
> > Right as the soc_new_compress() is called from soc-core for compressed dai
> > links. Since ASoC drivers don't use any of compress APIs directly, it would
> > be difficult to add a compile time failure so we are stuck with silent
> > runtime failures :(
>
> One feasible option would be to make the driver's dai creation a
> function pointer to the generic constructor. That is,
> soc_probe_link_dais() will run like:
>
> if (cpu_dai->driver->create)
> ret = cpu_dai->driver->create(rtd, num);
>
> and each driver passes soc_new_compress (or whatever) there. This is
> flexible and can be extended if any new stuff has to be handled.
> Even PCM creation or dai widget links can be passed in that form,
> too.
and the default would be snd_pcm_new so that *most* drivers dont need to add
this. Only Intel atom driver should add soc_new_compress() as create ops,
hence direct reference so no gaurds required
Looks good to me then, Mark you okay with this approach?
--
~Vinod
next prev parent reply other threads:[~2015-06-17 2:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 3:20 [PATCH v2 1/2] ASoC: soc-compress: add a config item for soc-compress Jie Yang
2015-06-15 3:20 ` [PATCH v2 2/2] ASoC: soc-compress: split soc-compress to a module Jie Yang
2015-06-15 15:07 ` Mark Brown
2015-06-15 11:33 ` [PATCH v2 1/2] ASoC: soc-compress: add a config item for soc-compress Takashi Iwai
2015-06-15 14:15 ` Jie, Yang
2015-06-15 14:26 ` Takashi Iwai
2015-06-15 14:46 ` Jie, Yang
2015-06-15 15:05 ` Mark Brown
2015-06-16 0:49 ` Jie, Yang
2015-06-16 10:54 ` Mark Brown
2015-06-16 12:36 ` Jie, Yang
2015-06-16 16:06 ` Mark Brown
2015-06-16 16:14 ` Takashi Iwai
2015-06-16 16:17 ` Takashi Iwai
2015-06-16 16:25 ` Vinod Koul
2015-06-16 16:36 ` Takashi Iwai
2015-06-17 2:54 ` Vinod Koul [this message]
2015-06-17 12:23 ` Mark Brown
2015-06-17 16:22 ` Vinod Koul
2015-06-17 16:38 ` Mark Brown
2015-06-18 2:59 ` Jie, Yang
2015-06-17 11:10 ` Jie, Yang
2015-09-15 6:53 ` Jie, Yang
2015-06-16 16:29 ` Qais Yousef
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=20150617025448.GB28601@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@intel.com \
--cc=ramesh.babu@intel.com \
--cc=tiwai@suse.de \
--cc=vivian.zhang@intel.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