Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jie Yang <yang.jie@intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	alsa-devel@alsa-project.org, broonie@kernel.org,
	liam.r.girdwood@intel.com
Subject: Re: [PATCH] ALSA: jack: create jack kcontrols for every jack input device
Date: Thu, 19 Mar 2015 11:51:23 +0100	[thread overview]
Message-ID: <s5hh9thw990.wl-tiwai@suse.de> (raw)
In-Reply-To: <1426754418-13477-1-git-send-email-yang.jie@intel.com>

At Thu, 19 Mar 2015 16:40:18 +0800,
Jie Yang wrote:
> 
> From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
> 
> Currently the ALSA jack core registers only input devices for each jack
> registered. These jack input devices are not readable by userspace devices
> that run as non root.
> 
> This patch adds support for additionally registering jack kcontrol devices
> for every input jack registered. This allows non root userspace to read
> jack status.
> 
> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
> Modified-by: Jie Yang <yang.jie@intel.com>
> Signed-off-by: Jie Yang <yang.jie@intel.com>
> Reveiwed-by: Mark Brown <broonie@kernel.org>
> ---
>  include/sound/control.h |  2 ++
>  include/sound/jack.h    |  2 ++
>  sound/core/jack.c       | 89 +++++++++++++++++++++++++++++++++++++++++++++++--
>  3 files changed, 91 insertions(+), 2 deletions(-)
>  mode change 100644 => 100755 sound/core/jack.c
> 
> diff --git a/include/sound/control.h b/include/sound/control.h
> index 75f3054..023b70a 100644
> --- a/include/sound/control.h
> +++ b/include/sound/control.h
> @@ -66,6 +66,7 @@ struct snd_kcontrol_volatile {
>  
>  struct snd_kcontrol {
>  	struct list_head list;		/* list of controls */
> +	struct list_head jack_list;		/* list of controls belong to the same jack*/
>  	struct snd_ctl_elem_id id;
>  	unsigned int count;		/* count of same elements */
>  	snd_kcontrol_info_t *info;
> @@ -75,6 +76,7 @@ struct snd_kcontrol {
>  		snd_kcontrol_tlv_rw_t *c;
>  		const unsigned int *p;
>  	} tlv;
> +	unsigned int jack_bit_idx;	/*the corresponding jack type bit index */
>  	unsigned long private_value;
>  	void *private_data;
>  	void (*private_free)(struct snd_kcontrol *kcontrol);

NAK for these additions.  There must be a way to implement without
such *generic* additions in kcontrol.


Takashi

  parent reply	other threads:[~2015-03-19 10:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19  8:40 [PATCH] ALSA: jack: create jack kcontrols for every jack input device Jie Yang
2015-03-19  8:53 ` Liam Girdwood
2015-03-19  9:02   ` Liam Girdwood
2015-03-19  9:12   ` Jie, Yang
2015-03-19 10:51 ` Takashi Iwai [this message]
2015-03-19 12:01   ` Takashi Iwai
2015-03-19 13:53   ` Jie, Yang
2015-03-19 14:01     ` Takashi Iwai
2015-03-19 14:04       ` Jie, Yang

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=s5hh9thw990.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=yang.jie@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