Re: [Alsa-user] variable input to ALSA via .asoundrc + shell variable

2015-03-23 Thread Clemens Ladisch
Dmitri Seletski wrote:
 It came to my attention, that I can start process and pass some
 variable to ALSA upon execution, so it may change PCM for example.

 I took information from here:

 http://blog.vrplumber.com/b/2012/03/23/control-default-alsa-device/

 I tried it and it worked. However, it didn't work as expected for me. I
 was able to see rate is changing if I used various PCM with variable.
 So this part worked.

 I was able to check with /proc/asound/card0/pcm0p/sub0/hw_params file,
 it showed correct rate when I was using different PCM's.

 However, it seems that something happened to dmix,
 Some processes failed with device busy message, devices, who used
 default rate settings, to which I did not change rate with shell
 variable.

This is probably because those processes ignore the default device and
got directly to some hw device.

 My question, is, is there any user documentation to those three lines:
 @func getenv
  vars [ DISPLAY_ALSA_DEVICE ]
  default front

Not really.

 I want to know if function in question can be used in non !default
 device?

Yes.


Regards,
Clemens

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] variable input to ALSA via .asoundrc + shell variable

2015-03-23 Thread Dmitri Seletski
On Mon, 23 Mar 2015 09:06:01 +0100
Clemens Ladisch cladi...@googlemail.com wrote:

 Dmitri Seletski wrote:
  It came to my attention, that I can start process and pass some
  variable to ALSA upon execution, so it may change PCM for example.
 
  I took information from here:
 
  http://blog.vrplumber.com/b/2012/03/23/control-default-alsa-device/
 
  I tried it and it worked. However, it didn't work as expected for
  me. I was able to see rate is changing if I used various PCM with
  variable. So this part worked.
 
  I was able to check with /proc/asound/card0/pcm0p/sub0/hw_params
  file, it showed correct rate when I was using different PCM's.
 
  However, it seems that something happened to dmix,
  Some processes failed with device busy message, devices, who used
  default rate settings, to which I did not change rate with shell
  variable.
 
 This is probably because those processes ignore the default device
 and got directly to some hw device.
 
  My question, is, is there any user documentation to those three
  lines: @func getenv
   vars [ DISPLAY_ALSA_DEVICE ]
   default front
 
 Not really.
 
  I want to know if function in question can be used in non !default
  device?
 
 Yes.
 
 
 Regards,
 Clemens

Thanks!

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] variable input to ALSA via .asoundrc + shell variable

2015-03-21 Thread Dmitri Seletski
Hello.

It came to my attention, that I can start process and pass some
variable to ALSA upon execution, so it may change PCM for example.

I took information from here:

http://blog.vrplumber.com/b/2012/03/23/control-default-alsa-device/

I tried it and it worked. However, it didn't work as expected for me. I
was able to see rate is changing if I used various PCM with variable.
So this part worked.

I was able to check with /proc/asound/card0/pcm0p/sub0/hw_params file,
it showed correct rate when I was using different PCM's.

However, it seems that something happened to dmix,
Some processes failed with device busy message, devices, who used
default rate settings, to which I did not change rate with shell
variable.

My question, is, is there any user documentation to those three lines:
@func getenv
 vars [ DISPLAY_ALSA_DEVICE ]
 default front

I get that default tells !default PCM to use front in case shell
variable DISPLAY_ALSA_DEVICE is empty or doesn't correspond to
existin PCM.
I need to know, @func getenv, how it works.
I want to know if function in question can be used in non !default
device? My testing showed, that it's not, but may be I am not doing
something right. In other words, if shell variable can be read by
different PCm than !default?

I have read ALSA programmer's documentation on this function,but words
are so generic, that I(no programmer) didn't understand them.

Thanks in advance
Dmitri Seletski

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user