From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: updated patch for period_size constraint Date: Tue, 10 Sep 2002 18:47:01 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <20020910152959.91672.qmail@web11503.mail.yahoo.com> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by alsa.alsa-project.org (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id SAA29519 for ; Tue, 10 Sep 2002 18:47:07 +0200 In-Reply-To: <20020910152959.91672.qmail@web11503.mail.yahoo.com> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Guilhem Tardy Cc: Jaroslav Kysela , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org Hi Guilhem, At Tue, 10 Sep 2002 08:29:59 -0700 (PDT), Guilhem Tardy wrote: > > Hi all, > > I modified my previous patch for supporting a period_size (rather than > period_bytes) constraint with Takashi's suggestion that the fields be non-zero > for either constraint to kick in. See file in attachment. It has worked fine on > my hardware for the past few days. you don't need to modify the common code. my intention was not to change the common code, too, unless other drivers also need this constraint. just add the constraint in open callback, such like int your_pcm_open(snd_pcm_substream_t *substream) { ... err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, your_period_size_min, your_period_size_max); ... } this is the cleanest solution. ciao, Takashi ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390