You are not logged in.
I often use a headset, to select if using the headset or the normal soundcard I use a environment variable thanks to this code:
## .asound.rc
@args.CARD {
type string
default {
@func getenv
vars {
0 ALSA_CARD
}
default {
@func refer
name 'defaults.pcm.card'
}
}
}Unfortunately the new headset has reversed channels so I created a pcm to fix:
pcm.swapped {
type route
slave {
pcm "hw:Set"
}
ttable.0.1 1
ttable.1.0 1
}
pcm.HeadsetSwapped {
type plug
slave {
pcm "pcm.swapped"
}
}The pcm works, but how can I set it via environment variable?
Thanks
Paolo
Offline