On 2007-10-08 08:23, Rene Herman wrote:> You might consider this less of of a hack -- it uses the ALSA API to query > the information from the PCM handle directly. Please see the library > docoumentation for other information you can extract from a hw_params struct.> > (I don't suppose you can ever get anything but dir == 0 for "hw" devices).> > Introducing a /proc/asound/card0/pcm0{p,c}/hw_limits or similar might not be > a bad idea though? Yes! I'm a novice and had no idea it would be so difficultto determine the native sample rate for a particular device.I'm using an nVidia MCP67 (hda_intel) with Jack and it tookhours of fiddling to find that it seems to run best at 3 periods,512 frames @ 96000 khtz. It's the first audio device I've hadthat will record at 192000 but "seems to run best" at 96000and at first I had no idea it would even do 96000/192000. Any chance that your program could take an arg to investigateother cards (or perhaps plugins) and also return an errno soit could be used in scripts ? # gcc -W -Wall -o snd_rate snd_rate.c -l asound snd_rate.c: In function ‘main’: snd_rate.c:14: warning: the address of ‘params’ will always evaluate as ‘true’ # snd_rate snd_pcm_open: Device or resource busy In fact, why isn't there a single simple "alsainfo" typeprogram that tells a user some (or a lot) of info abouttheir hardware and alsa-lib install ? --markc -------------------------------------------------------------------------This SF.net email is sponsored by: Splunk Inc.Still grepping through log files to find problems? Stop.Now Search log events and configuration files using AJAX and a browser.Download your FREE copy of Splunk now >> http://get.splunk.com/_______________________________________________Alsa-user mailing listAlsa-user@xxxxxxxxxxxxxxxxxxxxxxxxxx://lists.sourceforge.net/lists/listinfo/alsa-user