* loading mixer control values from a different file when opening an device
@ 2012-04-01 15:31 Ziv Haziz
2012-04-02 8:01 ` Clemens Ladisch
0 siblings, 1 reply; 3+ messages in thread
From: Ziv Haziz @ 2012-04-01 15:31 UTC (permalink / raw)
To: alsa-devel
Hi All,
i'm using asound.conf file to define several devices
where each one is configuring
my sound device differently
changing route, setting different volumes and etc)
i would have like to load setting
from a different file only when accessing the a
specific device - something like this:
pcm.MyDevice {
type hooks
slave.pcm {
type hw
device 0
}
<i would like to place here something which
will "func load" from another file>
hooks.0 {
type ctl_elems
hook_args [
]
}
so when someone will playback MyDevice it
will call also hooks from the other file
but i can't make it work, tried to use the alsa.conf
as example - any example will be highly appreciated
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: loading mixer control values from a different file when opening an device
2012-04-01 15:31 loading mixer control values from a different file when opening an device Ziv Haziz
@ 2012-04-02 8:01 ` Clemens Ladisch
[not found] ` <FC1850374E3CB245B9E97002380578E001CC639B@ILMAIL01.dspg.com>
0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2012-04-02 8:01 UTC (permalink / raw)
To: Ziv Haziz; +Cc: alsa-devel
Ziv Haziz wrote:
> i would have like to load setting
> from a different file only when accessing the a
> specific device - something like this:
>
> pcm.MyDevice {
> type hooks
> slave.pcm {
> type hw
> device 0
> }
>
> <i would like to place here something which
> will "func load" from another file>
>
> hooks.0 {
> type ctl_elems
> hook_args [
>
> ]
>
> }
The "hooks" PCM plugin is something completely separate
from the global "@hooks" mechanism.
You can include configuration files directly:
http://www.alsa-project.org/alsa-doc/alsa-lib/conf.html#conf_include
What is the actual problem you're trying to solve?
Regards,
Clemens
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: loading mixer control values from a different file when opening an device
[not found] ` <FC1850374E3CB245B9E97002380578E001CC639B@ILMAIL01.dspg.com>
@ 2012-04-02 13:04 ` Clemens Ladisch
0 siblings, 0 replies; 3+ messages in thread
From: Clemens Ladisch @ 2012-04-02 13:04 UTC (permalink / raw)
To: Ziv Haziz; +Cc: alsa-devel
Ziv Haziz wrote:
> I have tried the method described in the link (using <> for loading
> other files) but I got an error - maybe I did not construct the small
> configuration file correctly.
Maybe, maybe not. My crystal ball broke yesterday, so I do not know
what exactly you tried.
> Is the <> method works like the c preprocessor #include directive?
Yes.
I put this into my ~/.asoundrc:
pcm.test {
type plug
slave {
pcm "hw:0"
channels 2
}
</home/cladisch/my-ttable.conf>
}
and this into ~/my-ttable.conf:
ttable [
[ 0 1 ]
[ 1 0 ]
]
and it works.
Regards,
Clemens
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-02 13:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-01 15:31 loading mixer control values from a different file when opening an device Ziv Haziz
2012-04-02 8:01 ` Clemens Ladisch
[not found] ` <FC1850374E3CB245B9E97002380578E001CC639B@ILMAIL01.dspg.com>
2012-04-02 13:04 ` Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.