From: Mengdong Lin <mengdong.lin@linux.intel.com>
To: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>,
alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
vinod.koul@intel.com,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Mark Brown <broonie@kernel.org>
Subject: Re: [RFC 0/4] Add support for DAI link addition dynamically
Date: Mon, 22 Feb 2016 16:51:48 +0800 [thread overview]
Message-ID: <56CACC24.9040400@linux.intel.com> (raw)
In-Reply-To: <CANQOkFHMEeSQY1hVBrQX_YFTf48pD3yBsecG79C1qT1=5=2PMA@mail.gmail.com>
On 02/18/2016 03:57 PM, Vaibhav Agarwal wrote:
> On 18 February 2016 at 10:53, Mengdong Lin <mengdong.lin@linux.intel.com> wrote:
>> Since the codec driver is generic and can be used for many machines so I
>> feel we should avoid adding too machine-specific code to it (e.g. the soc
>> card name) as much as possible.
>
> We are not adding any machine-specific code in generic codec driver.
> In case we are using generic codec driver (existing in
> sound/soc/codecs), it would need a helper driver to glue it to soc
> card dynamically. Otherwise, for a specific platform, we can have a
> wrapper codec driver that can fetch capabilities of removable codec
> (may be via binary data) and expose them to already known soc cards
> for that device.
>
>>
>> I think the machine driver can understand all use cases for a platform,
>> including static or removable connections between the SOC and codecs. So
>> it's able to specify the removable codec and the codec DAIs needed by the
>> machine, as well as these removable links. Please correct me if my
>> understanding is wrong.
>
> As per my opinion, in case a platform supports say I2S interface, then
> any removable codec module utilizing I2S mode should work with that
> platform. So, knowing complete info about the codec may not be
> possible.
>
Okay. Then the machine driver has no way to pre-define the removal codec
and the BE links. Thanks for your clarification.
Can the machine driver leave the codec and codec dai empty in the
removable BE links? When a compatible codec is registered, the ASoC core
will fill these fields and bind the links. When the codec is removed,
the ASoC will unbind the links and clear the fields.
>> Do you mean the machine driver has no idea about these removal codecs?
>> And could you share more info about the removal codec in your use case?
>>
>
> A removable codec can be of any manufacturer using xyz codec. As
> mentioned before, it may not have info about possible codec to be
> connected. But, it can definitely choose the functionality supported
> based on it own capabilities.
>>
>> But IMHO I hope we can avoid this. So I suggested let machine driver define
>> some 'removable' links and ASoC core can bind/unbind them automatically with
>> the registration/unregistration of the codec component. I think most of your
>> code for ASoC core can still be reused.
>
> I wonder, if we can extend snd_soc_add_dai_link() to perform complete
> binding as well, with a conditional check for (!card->instantiated) to
> exit early. This would enable us using this API itself for the purpose
> we intend too. Any thoughts/suggestions?
Yes. I think we can extend this function like this if need.
Thanks
Mengdong
>
> Also, keeping in mind that we don't have codec & codec_dai info in
> advance, I can't see any value addition of keeping place holders for
> DAI link based on platform capability.
>
> --
> Thanks,
> ./va
>
prev parent reply other threads:[~2016-02-22 8:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 12:19 [RFC 0/4] Add support for DAI link addition dynamically Vaibhav Agarwal
2016-02-15 12:19 ` [RFC 1/4] ASoc: Use ref_count for soc DAI & component Vaibhav Agarwal
2016-02-15 13:59 ` Mark Brown
2016-02-16 13:27 ` Vaibhav Agarwal
2016-02-15 12:19 ` [RFC 2/4] alsa: add locked variant for snd_ctl_remove_id Vaibhav Agarwal
2016-02-15 14:02 ` Mark Brown
2016-02-16 13:54 ` Vaibhav Agarwal
2016-02-16 14:13 ` Takashi Iwai
2016-02-16 14:15 ` Vaibhav Agarwal
2016-02-15 12:19 ` [RFC 3/4] ASoC: Enable dynamic DAIlink insertion & removal Vaibhav Agarwal
2016-02-15 17:02 ` Mark Brown
2016-02-16 14:34 ` Vaibhav Agarwal
2016-02-16 19:03 ` Mark Brown
2016-02-15 12:19 ` [RFC 4/4] ASoC: Change soc-card codec_conf array to a list Vaibhav Agarwal
2016-02-15 17:11 ` Mark Brown
2016-02-15 14:22 ` [RFC 0/4] Add support for DAI link addition dynamically Lars-Peter Clausen
2016-02-17 5:52 ` Mengdong Lin
2016-02-17 8:25 ` Mengdong Lin
2016-02-17 9:31 ` Vaibhav Agarwal
2016-02-18 5:23 ` Mengdong Lin
2016-02-18 7:57 ` Vaibhav Agarwal
2016-02-18 13:39 ` Mark Brown
2016-02-22 8:51 ` Mengdong Lin [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=56CACC24.9040400@linux.intel.com \
--to=mengdong.lin@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=liam.r.girdwood@linux.intel.com \
--cc=peter.ujfalusi@ti.com \
--cc=vaibhav.agarwal@linaro.org \
--cc=vinod.koul@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;
as well as URLs for NNTP newsgroup(s).