From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Vinod Koul <vinod.koul@intel.com>,
"Lin, Mengdong" <mengdong.lin@intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Mengdong Lin <mengdong.lin@linux.intel.com>,
"tiwai@suse.de" <tiwai@suse.de>,
"broonie@kernel.org" <broonie@kernel.org>,
"Girdwood, Liam R" <liam.r.girdwood@intel.com>,
"Nc, Shreyas" <shreyas.nc@intel.com>
Subject: Re: [PATCH v2 0/5] topology: Enhance support for private data
Date: Tue, 19 Jul 2016 14:14:12 +0900 [thread overview]
Message-ID: <578DB724.8040204@sakamocchi.jp> (raw)
In-Reply-To: <20160719035950.GC9681@localhost>
On Jul 19 2016 12:59, Vinod Koul wrote:
>> Yes, you're right. snd_ctl_new1() dropped SNDRV_CTL_ELEM_ACCESS_USER flag.
>> I'll remove this from the topology user space tool to avoid confusion.
>
> Oh no, that won't be a good idea.
>
> We would like to specify the access for controls from topology. Some
> controls can be read only and some write only :)
>
> For example, any VU-meter controls should be read-only. Similarly if we have
> some user data being sent to some modules which can do do all fancy audio
> detection then these controls should be write-only.
?
I just suggested to remove 'user' from topology implementation in
userspace library. You can still control access rights of control
elements by adding enough flags; 'read' or 'write'
(SNDRV_CTL_ELEM_ACCESS_READ or SNDRV_CTL_ELEM_ACCESS_WRITE).
SNDRV_CTL_ELEM_ACCESS_USER has no relationship to your purposes.
When a control element has SNDRV_CTL_ELEM_ACCESS_USER flag, a control
element set including the element has below operations;
- struct snd_kcontrol.info = snd_ctl_elem_user_enum_info or
snd_ctl_elem_user_info
- struct snd_kcontrol.get = snd_ctl_elem_user_get
- struct snd_kcontrol.put = snd_ctl_elem_user_put
- struct snd_kcontrol.tlv.c = snd_ctl_elem_user_tlv
When userland applications call ioctl(2) with SNDRV_CTL_IOCTL_ELEM_ADD,
then ALSA ctl core adds new control element set. The 'USER' flag is used
only for this case.
I think it better for you to read 'sound/core/control.c' or my test
program in alsa-lib source.
http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=test/user-ctl-element-set.c
Regards
Takashi Sakamoto
next prev parent reply other threads:[~2016-07-19 5:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 12:17 [PATCH v2 0/5] topology: Enhance support for private data mengdong.lin
2016-07-15 12:17 ` [PATCH v2 1/5] topology: An element can refer to multipe data sections in text conf file mengdong.lin
2016-07-15 12:18 ` [PATCH v2 2/5] topology: Merge lookup for data reference into tplg_copy_data() mengdong.lin
2016-07-15 12:18 ` [PATCH v2 3/5] topology: Change uuid value to 16 separate characters in text conf file mengdong.lin
2016-07-15 12:19 ` [PATCH v2 4/5] topology: Parse vendor private data for manifest mengdong.lin
2016-07-15 12:19 ` [PATCH v2 5/5] topology: Tuple type can have an extenstion mengdong.lin
2016-07-16 12:58 ` [PATCH v2 0/5] topology: Enhance support for private data Takashi Sakamoto
2016-07-18 2:47 ` Mengdong Lin
2016-07-18 3:43 ` Takashi Sakamoto
2016-07-18 15:06 ` Lin, Mengdong
2016-07-19 3:59 ` Vinod Koul
2016-07-19 5:14 ` Takashi Sakamoto [this message]
2016-07-19 8:44 ` Lin, Mengdong
2016-07-17 8:03 ` Takashi Iwai
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=578DB724.8040204@sakamocchi.jp \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@intel.com \
--cc=mengdong.lin@intel.com \
--cc=mengdong.lin@linux.intel.com \
--cc=shreyas.nc@intel.com \
--cc=tiwai@suse.de \
--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.