Re: How to get set/fixed sample rate of ALSA device?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/06/2007 11:56 PM, Peteris Krisjanis wrote:

> I have onboard sound card of ATI fame:
> 0000:00:14.2 Audio device: ATI Technologies Inc SB450 HDA Audio (rev 01)
> Uses snd-intel-hda module.
> 
> So, this sound card seems to be fixed to 48000Hz for recording. I
> know, that using plughw will help to avoid any problems with
> resampling and I also have no problem to specify 48000 while
> recording. However, it made me curious - is there at least partly
> usable way to get current sample rate of device via ALSA drivers and
> tools? I know, for example, ice1712 allows me to set and get sample
> rate via mixer, but what about simpler soundcards?

"Current sample rate" only has meaning with the device open , and if I 
understand you right, a "cat /proc/asound/card0/pcm0{p,c}/sub0/hw_params 
will then get you what you want as to the "get" part (substitute for 0 in 
the above as required).

As to the set, you'd open it with different parameters, and you then 
supposedly know what they were, I guess...

Rene.

-------------------------------------------------------------------------
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 list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux