From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [RFC][PATCH 0/8] ALSA: dice: constrain PCM substreams to current sampling transfer frequency Date: Sat, 21 Nov 2015 10:46:01 +0100 Message-ID: References: <1447579536-4459-1-git-send-email-o-takashi@sakamocchi.jp> <564D4360.8050503@sakamocchi.jp> <564E9D6C.7060408@sakamocchi.jp> <564F01D0.20603@sakamocchi.jp> <564FBAE4.9070203@sakamocchi.jp> 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 AAD282606F6 for ; Sat, 21 Nov 2015 10:46:03 +0100 (CET) In-Reply-To: <564FBAE4.9070203@sakamocchi.jp> 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: Takashi Sakamoto Cc: alsa-devel@alsa-project.org, clemens@ladisch.de, ffado-devel@lists.sf.net List-Id: alsa-devel@alsa-project.org On Sat, 21 Nov 2015 01:29:24 +0100, Takashi Sakamoto wrote: > > In your original statement: > >> As a result, userspace applications can request PCM substreams at current > >> sampling transfer frequency. Therefore, when users want to start PCM > >> substreams at different rate, they should set the rate in advance by the > >> other ways (i.e. ffado-dbus-server/ffado-mixer). > > > > So, an application cannot change the PCM rate other than the value > > currently set by another tool. Is it correct? > > Correct. The single rate restriction is fairly common among many drivers. As this appears like a hardware limitation on DICE, it's fine, per se. But, requiring a special tool to set the sample rate is different; it sounds strange to me. Why it must be *only* by another tool, not by PCM interface itself? Suppose you playing a single application. Kernel driver also knows that it's currently only a single process accessing the hardware. What prevents it changing the sample rate? And, even if we implement in that way -- allowing only the locked sample rate -- by some reason (e.g. due to the code complexity), why can't it be controlled via a more common interface like a normal mixer element or such? Some drivers do so, simply by providing an enum control for the master sample rate. So again: restricting the PCM per one rate itself is understandable. The main question is, however, how to manage the current sample rate. If the first-user-allowed rule is applied, there won't be a big regression, for example. thanks, Takashi