From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 2/2] add API to allow disabling period interrupt Date: Tue, 02 Nov 2010 08:28:55 +0100 Message-ID: References: <1288649614-31581-1-git-send-email-pierre-louis.bossart@intel.com> <1288649614-31581-2-git-send-email-pierre-louis.bossart@intel.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 B30F31038DE for ; Tue, 2 Nov 2010 08:28:55 +0100 (CET) In-Reply-To: <1288649614-31581-2-git-send-email-pierre-louis.bossart@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, Pierre-Louis Bossart List-Id: alsa-devel@alsa-project.org At Mon, 1 Nov 2010 17:13:34 -0500, Pierre-Louis Bossart wrote: > > cleaned-up version of the patch posted on May 17, 2010 by > Clemens Ladisch > (No filtering in pcm_multi and pcm_direct info fields) > > Signed-off-by: Pierre-Louis Bossart > --- > configure.in | 2 +- > include/pcm.h | 3 ++ > include/sound/asound.h | 5 +++- > src/Versions.in | 7 +++++ > src/pcm/pcm.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ > src/pcm/pcm_local.h | 3 ++ > 6 files changed, 79 insertions(+), 2 deletions(-) > > diff --git a/configure.in b/configure.in > index c353759..0a67de7 100644 > --- a/configure.in > +++ b/configure.in > @@ -12,7 +12,7 @@ dnl add API = c+1:0:a+1 > dnl remove API = c+1:0:0 > dnl ************************************************* > AC_CANONICAL_HOST > -AM_INIT_AUTOMAKE(alsa-lib, 1.0.23) > +AM_INIT_AUTOMAKE(alsa-lib, 1.0.24) > eval LIBTOOL_VERSION_INFO="2:0:0" > dnl ************************************************* > AM_CONDITIONAL(INSTALL_M4, test -n "${ACLOCAL}") > diff --git a/include/pcm.h b/include/pcm.h > index f3618c3..cd506ab 100644 > --- a/include/pcm.h > +++ b/include/pcm.h > @@ -531,6 +531,7 @@ int snd_pcm_hw_params_can_resume(const snd_pcm_hw_params_t *params); > int snd_pcm_hw_params_is_half_duplex(const snd_pcm_hw_params_t *params); > int snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t *params); > int snd_pcm_hw_params_can_sync_start(const snd_pcm_hw_params_t *params); > +int snd_pcm_hw_params_can_disable_period_irq(const snd_pcm_hw_params_t *params); > int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params, > unsigned int *rate_num, > unsigned int *rate_den); > @@ -626,6 +627,8 @@ int snd_pcm_hw_params_set_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *par > int snd_pcm_hw_params_get_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); > int snd_pcm_hw_params_set_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); > int snd_pcm_hw_params_get_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); > +int snd_pcm_hw_params_set_period_irq(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); > +int snd_pcm_hw_params_get_period_irq(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val); > > int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); > int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); > diff --git a/include/sound/asound.h b/include/sound/asound.h > index fa88938..fbcfef9 100644 > --- a/include/sound/asound.h > +++ b/include/sound/asound.h > @@ -278,6 +278,8 @@ enum sndrv_pcm_subformat { > #define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */ > #define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */ > #define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */ > +#define SNDRV_PCM_INFO_NO_PERIOD_IRQ 0x00800000 /* period interrupt can be disabled */ > +#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */ > > enum sndrv_pcm_state { > SNDRV_PCM_STATE_OPEN = 0, /* stream is open */ > @@ -346,7 +348,8 @@ enum sndrv_pcm_hw_param { > > #define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */ > #define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1<<1) /* export buffer */ > - > +#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_IRQ (1<<2) /* disable period > + interrupts */ > struct sndrv_interval { > unsigned int min, max; > unsigned int openmin:1, > diff --git a/src/Versions.in b/src/Versions.in > index 8d2dd11..112b9ec 100644 > --- a/src/Versions.in > +++ b/src/Versions.in > @@ -129,3 +129,10 @@ ALSA_0.9.7 { > @SYMBOL_PREFIX@alsa_lisp_*; > } ALSA_0.9.5; > > +ALSA_1.0.24 { > + global: > + @SYMBOL_PREFIX@snd_pcm_hw_params_can_disable_period_irq; > + @SYMBOL_PREFIX@snd_pcm_hw_params_set_period_irq; > + @SYMBOL_PREFIX@snd_pcm_hw_params_get_period_irq; > + > +} ALSA_0.9.7; > \ No newline at end of file In general we don't put this any more. All snd_* are exported unless blacklisted. So, avoid changing the version number in your patch. thanks, Takashi