From: Vinod Koul <vinod.koul@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
Charles Keepax <Charles.Keepax@Wolfsonmicro.com>,
Dimitris Papastamos <Dimitris.Papastamos@Wolfsonmicro.com>,
lgirdwood@gmail.com, broonie@kernel.org,
Omair Mohammed Abdullah <omair.m.abdullah@intel.com>,
pierre-louis.bossart@intel.com
Subject: Re: [RFC v2] ASoC: core: add a helper for extended byte controls using TLV
Date: Tue, 15 Jul 2014 21:00:59 +0530 [thread overview]
Message-ID: <20140715153059.GH4387@intel.com> (raw)
In-Reply-To: <s5hlhrur8nu.wl%tiwai@suse.de>
On Tue, Jul 15, 2014 at 04:36:21PM +0200, Takashi Iwai wrote:
> At Tue, 15 Jul 2014 12:17:45 +0530,
> Vinod Koul wrote:
> >
> > From: Omair Mohammed Abdullah <omair.m.abdullah@intel.com>
> >
> > ALSA supports arbitrary length TLVs for each kcontrol that can be used
> > to pass metadata about the control (e.g. volumes, enum information). The
> > same transport mechanism is now used for arbitrary length data by
> > defining a new helper.
> >
> > Signed-off-by: Omair Mohammed Abdullah <omair.m.abdullah@intel.com>
> > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> > ---
> > As discussed in [1] we are adding a new approach to solve the byte control
> > extensions by using existing TLVs and combining them with byte controls. The
> > usermode on seeing byte control + TLV can treat it differently as it does for
> > control + TLV combination today. This way we don't change kernel API and
> > existing users will be happy, while providing embedded folks facility to pass
> > large bytes data to kcontrols
> > [1]:
> > http://mailman.alsa-project.org/pipermail/alsa-devel/2013-November/069483.html
>
> Yeah, this would bypass the limitation nicely.
Yes thats what I realized when Omair pointed this out!
> > +int snd_soc_bytes_tlv_callback(struct snd_kcontrol *kcontrol, int op_flag,
> > + unsigned int size, unsigned int __user *tlv)
> > +{
> > + struct soc_bytes_ext *params = (void *)kcontrol->private_value;
> > + unsigned int count = size < params->max ? size : params->max;
> > +
> > + switch (op_flag) {
> > + case 0:
> > + if (params->get)
> > + params->get(tlv, count);
> > + break;
> > + case 1:
> > + if (params->put)
> > + params->put(tlv, count);
> > + break;
>
> No error propagation from the callback?
> Also, if a driver doesn't provide get or put, it gets no error?
Will fix that
>
> BTW, about the value of op_flag: I have a patch to define the
> constants (attached below), which I forgot until now. Now I put it
> into topic/tlv-opflag branch of sound git tree. If you'd like to use
> the new constants, merge (or base on) this branch.
yes rebased now..
--
~Vinod
prev parent reply other threads:[~2014-07-15 15:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-15 6:47 [RFC v2] ASoC: core: add a helper for extended byte controls using TLV Vinod Koul
2014-07-15 14:36 ` Takashi Iwai
2014-07-15 15:30 ` Vinod Koul [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=20140715153059.GH4387@intel.com \
--to=vinod.koul@intel.com \
--cc=Charles.Keepax@Wolfsonmicro.com \
--cc=Dimitris.Papastamos@Wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=omair.m.abdullah@intel.com \
--cc=pierre-louis.bossart@intel.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 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).