From: Takashi Iwai Subject: Re: [PATCH] ASOC:DAPM: extend dapm kcontrol to support runtime route update Date: Thu, 12 Dec 2013 17:52:59 +0100 Message-ID: References: <1386835619-18070-1-git-send-email-nhcao@marvell.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id A820B260886 for ; Thu, 12 Dec 2013 17:52:59 +0100 (CET) In-Reply-To: <1386835619-18070-1-git-send-email-nhcao@marvell.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Nenghua Cao Cc: alsa-devel@alsa-project.org, Henry zhao , Liam Girdwood , Mark Brown , Yacine Belkadi , cxie4@marvell.com List-Id: alsa-devel@alsa-project.org At Thu, 12 Dec 2013 16:06:59 +0800, Nenghua Cao wrote: > > From: nhcao > > DPCM can dynamically alter the FE to BE PCM links at runtime based > on mixer setting updates. DAPM has provided common get/put function for > mixer/mux. But these function doesn't call soc_dpcm_runtime_update() > func to update pcm links. This patch defines a DPCM DPCM kcontrol. For > this control, the common get/put function will update FE to BE links > dynamically. This patch has no impact to the current code. > > Change-Id: I45e291f467e4fa17e21aa8923c2b712d52067aca Don't include such an internal tag in the public patch. > Signed-off-by: nhcao You have to provide your real name in from and signed-off-by tags. > --- > include/sound/control.h | 4 ++++ > include/sound/soc-dapm.h | 32 ++++++++++++++++++++++++++++++++ > sound/core/control.c | 1 + > sound/soc/soc-dapm.c | 28 ++++++++++++++++++++++++---- > 4 files changed, 61 insertions(+), 4 deletions(-) > > diff --git a/include/sound/control.h b/include/sound/control.h > index 5358892..3788284 100644 > --- a/include/sound/control.h > +++ b/include/sound/control.h > @@ -44,6 +44,8 @@ struct snd_kcontrol_new { > unsigned int index; /* index of item */ > unsigned int access; /* access rights */ > unsigned int count; /* count of same elements */ > + /* this kcontrol impact fe<->be relationship at runtime */ > + unsigned char dpcm_checked; > snd_kcontrol_info_t *info; > snd_kcontrol_get_t *get; > snd_kcontrol_put_t *put; > @@ -63,6 +65,8 @@ struct snd_kcontrol { > struct list_head list; /* list of controls */ > struct snd_ctl_elem_id id; > unsigned int count; /* count of same elements */ > + /* this kcontrol impact fe<->be relationship at runtime */ > + unsigned char dpcm_checked; > snd_kcontrol_info_t *info; > snd_kcontrol_get_t *get; > snd_kcontrol_put_t *put; You don't need to extend the ALSA core API for such a purpose. It's ASoC-specific, so rather extend struct soc_mixer_control instead, if such a new flag is really needed. Takashi