From: Takashi Iwai Subject: Re: [PATCH 1/3] ALSA: pcm: add IEC958 channel status update Date: Wed, 02 Dec 2015 15:32:47 +0100 Message-ID: References: <1449066126-19431-1-git-send-email-moise.gergaud@st.com> <1449066126-19431-2-git-send-email-moise.gergaud@st.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 (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 2BE6C261A06 for ; Wed, 2 Dec 2015 15:32:48 +0100 (CET) In-Reply-To: <1449066126-19431-2-git-send-email-moise.gergaud@st.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: Moise Gergaud Cc: rmk+kernel@arm.linux.org.uk, alsa-devel@alsa-project.org, broonie@kernel.org, arnaud.pouliquen@st.com, lgirdwood@gmail.com List-Id: alsa-devel@alsa-project.org On Wed, 02 Dec 2015 15:22:04 +0100, Moise Gergaud wrote: > > Add a helper to update only the IEC958 channel status sampling freq and > word length parameters from an ALSA snd_pcm_runtime structure, taking > account of the sample rate and sample size. > > Signed-off-by: Moise Gergaud > Acked-by: Arnaud Pouliquen > --- > include/sound/pcm_iec958.h | 19 ++++++++++- > sound/core/pcm_iec958.c | 78 +++++++++++++++++++++++++++++++--------------- > 2 files changed, 71 insertions(+), 26 deletions(-) > > diff --git a/include/sound/pcm_iec958.h b/include/sound/pcm_iec958.h > index 0eed397..0c84c69 100644 > --- a/include/sound/pcm_iec958.h > +++ b/include/sound/pcm_iec958.h > @@ -3,7 +3,24 @@ > > #include > > +#ifdef CONFIG_SND_PCM_IEC958 > int snd_pcm_create_iec958_consumer(struct snd_pcm_runtime *runtime, u8 *cs, > - size_t len); > + size_t len); > + > +int snd_pcm_update_iec958_consumer(struct snd_pcm_runtime *runtime, u8 *cs, > + size_t len); > +#else > +int snd_pcm_create_iec958_consumer(struct snd_pcm_runtime *runtime, u8 *cs, > + size_t len) > +{ > + return len; > +} > + > +int snd_pcm_update_iec958_consumer(struct snd_pcm_runtime *runtime, u8 *cs, > + size_t len) > +{ > + return len; > +} These must be static inline. And, shouldn't they return an error? Takashi