All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Hsin-yu Chao <hychao@chromium.org>
Cc: "Koul, Vinod" <vinod.koul@intel.com>,
	alsa-devel@alsa-project.org, Dylan Reid <dgreid@chromium.org>
Subject: Re: [PATCH] ucm: add cset-tlv command
Date: Wed, 23 Mar 2016 17:52:52 +0100	[thread overview]
Message-ID: <s5h37rhcf17.wl-tiwai@suse.de> (raw)
In-Reply-To: <CANyK0Snvs-oJz+God7GBry-DGibW-3Fhyyj3juR73UBkGBAhbg@mail.gmail.com>

On Wed, 23 Mar 2016 10:44:31 +0100,
Hsin-yu Chao wrote:
> 
> On Wed, Mar 23, 2016 at 5:21 PM, Takashi Iwai <tiwai@suse.de> wrote:
> > On Wed, 23 Mar 2016 10:15:21 +0100,
> > Hsin-yu Chao wrote:
> >>
> >> On Tue, Mar 22, 2016 at 7:48 PM, Takashi Iwai <tiwai@suse.de> wrote:
> >> > On Tue, 22 Mar 2016 10:10:34 +0100,
> >> > Hsin-Yu Chao wrote:
> >> >>
> >> >> This patch enables UCM to set a file in TLV format to kcontrol by:
> >> >> cset-tlv "name='<kcontrol-name>' <path-to-file>"
> >> >> This new 'cset-tlv' command will be used to write audio DSP to
> >> >> specific alsa control, where the driver expectes a file in TLV
> >> >> format.
> >> >>
> >> >> Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
> >> >
> >> > One problem in this approach is that the provided TLV data file isn't
> >> > portable.  Since we deal TLV as int arrays, it's endian-sensitive.
> >> > At least, some endian check would be needed.
> >> Thanks for the review. I think by extracting the length attribute (i.e
> >> tlv[1]) and compare it with the file size is sufficient here, since
> >> there is no way to figure out the endianness of the binary file passed
> >> in.
> >
> > Yeah, that should be good enough.
> >
> >
> >> Also I agree that additional check for crazy large or small file is
> >> necessary. According to the dsp files I test with, I'll set the tlv
> >> file size limit to between 8 bytes and 1MB.
> >
> > I guess the size will grow quickly in near future, so it'd be safer to
> > take a bit bigger.
> >
> How about using 16MB as upper limit?
> DSP file larger than that would take 1 second or more to load through USB 2.0.

Yes, 16MB should be big enough.


thanks,

Takashi

      reply	other threads:[~2016-03-23 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22  9:10 [PATCH] ucm: add cset-tlv command Hsin-Yu Chao
2016-03-22 11:48 ` Takashi Iwai
2016-03-23  9:15   ` Hsin-yu Chao
2016-03-23  9:21     ` Takashi Iwai
2016-03-23  9:44       ` Hsin-yu Chao
2016-03-23 16:52         ` Takashi Iwai [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=s5h37rhcf17.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=dgreid@chromium.org \
    --cc=hychao@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.