From: Arve Knudsen Subject: Re: Query devices in a non-blocking fashion Date: Mon, 15 Dec 2003 10:39:27 +0100 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <200312071919.hB7JJTNk004757@oud.linuxaudiosystems.com> <20031208161936.310df2cb.pochini@shiny.it> <3FDC8D16.6070608@boosthardware.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Jaroslav Kysela Cc: Patrick Shirkey , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org On Mon, 15 Dec 2003 09:59:16 +0100 (CET), Jaroslav Kysela = =20 wrote: > On Sun, 14 Dec 2003, Arve Knudsen wrote: > >> On Mon, 15 Dec 2003 01:17:26 +0900, Patrick Shirkey >> wrote: >> >> > If we have a DB of info how would we define the abilities of each=20 >> device? >> > >> > I assume this info is available in the driver layer because there is= a >> > point where ALSA will return false eg. if a card is not able to run = at >> > 48000Hz >> > >> > My opinion is that a simple function could be included in alsactl=20 >> which >> > scans for available devices, makes a list of their abilities. Everyo= ne >> > uses "post-insert alsactl restore" in the modules.conf file so it=20 >> would >> > be essentially a non issue from a user perspective. >> > >> > Couldn't this be saved in the config settings for alsactl? >> This whole database thing seems like overkill to me, to be honest. Thi= s=20 >> is >> dynamic information would best be obtained from cards during operation= , >> the only problem is that you have to lock the device. A better design=20 >> would >> be to, if possible, allow the configuration space to be read even when= a >> device is streaming. >> >> I dont know the dirty details of writing drivers, but would this be a >> problem? Perhaps we could differ between read-locked and write-locked >> configuration, so there would be inclusive read access to the device,=20 >> and >> totally exclusive access if it is to be modified. > > Again, the configuration space is runtime information and it might depe= nd > if a stream is active for given card. So, information might be useless > (different). > > Again, much better is to give this information from the user space rath= er > than adding code to the drivers. We may also describe the constraints > here. Will these constraints be updated during runtime, so they take the device= 's current state into account, such as samplerate vs number of channels? I hope this won't add to the complexity of ALSA-lib, though. Regards Arve Knudsen ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/