I have the situation where one program has hw:0,0 open. I have a different program (executable) which wants to know the hw_params of hw:0,0 from C/C++.
I can't open the same device a second time to be able to query the hw_param. I am aware I can query the /proc filesysetm, however I would prefer a method for doing that in an executable using alsa-lib.
Is it possible to query the hw_params of a device opened by a different program ?
Unfortunately, it's not possible. You can only check, if a device is busy. There are other methods to share this information between tasks (shared buffer, sockets etc.).
I have the situation where one program has hw:0,0 open. I have a different program (executable) which wants to know the hw_params of hw:0,0 from C/C++.
I can't open the same device a second time to be able to query the hw_param. I am aware I can query the /proc filesysetm, however I would prefer a method for doing that in an executable using alsa-lib.
Is it possible to query the hw_params of a device opened by a different program ?