From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Re: [PATCH] emu10k1: add interval timer support Date: Wed, 22 Sep 2004 12:16:36 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <1095405566.19045.35.camel@krustophenia.net> <1095795402.13220.21.camel@krustophenia.net> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1095795402.13220.21.camel@krustophenia.net> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Lee Revell Cc: Jaroslav Kysela , alsa-devel List-Id: alsa-devel@alsa-project.org At Tue, 21 Sep 2004 15:36:42 -0400, Lee Revell wrote: > > I am using kX ASIO as a reference for how multichannel PCM should work. > From the application's point of view, this looks like 16 mono channels. > In the mixer, for each of the 16 ASIO channels you have 4/8 drop down > boxes to set the FX send destinations and 4/8 sliders to set the send > amounts. By default ASIO 1 goes to FXBus channel 0, 2 goes to FXBus 1, > etc. Multiple applications can open the same ASIO channel and the > driver will allocate additional voices with the same send routing. > > I think that the ALSA equivalent would be to have another device with > channels_min=channels_max=1, and 16 substreams for which the routing > would be controlled with the mixer; if multiple applications open the > same substream we would allocate another voice. You would call > snd_pcm_period_elapsed for each of these streams in the handler for the > EFX capture interrupt. All applications using this device must use the > same period size settings, as in the Windows driver, the only setting in > the ASIO control panel is the latency aka buffer size. > > You would then use an .asoundrc plugin that would look like a 16 channel > PCM device, and would consist of 16 mono channels, hw:x,x,0 through > hw:x,x,15. Maybe I didn't get your point, but why not simply provide a 16-channel non-interleaved device? > I am not sure of a few things. Does it matter whether I use INTERLEAVED > or NONINTERLEAVED, since the device only supports mono streams? No, it shouldn't. > Also, > since all capture and playback streams for this device will be updated > in the same interrupt handler, would it be best to use the linked > substreams feature of ALSA, or do this manually with list_for_each? The interrupt handling of linked substreams are not in the linked way. The linked streams are provided for the synchronized start (and stop). The update must be done independently. So, the correct implementation is the latter, list_for_each in the irq handler, regardless of the linked state. Takashi ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php