Use softvol for PCM outputs

Use softvol plugin for codecs without PCM volume controls (e.g. c-media).
The default PCM is redefined to use softvol for playback.
This commit is contained in:
Takashi Iwai 2005-01-03 17:17:43 +00:00
parent 82e408d08b
commit 156eb1228e
3 changed files with 255 additions and 96 deletions

View file

@ -7,11 +7,50 @@
ICH.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
type integer
}
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
control {
name "PCM Playback Volume"
card $CARD
}
}
# with dmix?
ICH.pcm.default {
@args [ CARD ]
@args.CARD {
type integer
}
type asym
playback.pcm {
type plug
slave.pcm {
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
control {
name "PCM Playback Volume"
card $CARD
}
}
}
capture.pcm {
type plug
slave.pcm {
type hw
card $CARD
device 0
}
}
type hw
card $CARD
device 0
}
<confdir:pcm/surround40.conf>
@ -19,17 +58,19 @@ ICH.pcm.front.0 {
ICH.pcm.surround40.0 {
@args [ CARD ]
@args.CARD {
type string
type integer
}
type hooks
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
type hooks
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
name "Line-In As Surround"
preserve true
@ -44,7 +85,12 @@ ICH.pcm.surround40.0 {
lock true
optional true
}
]
]
}
}
control {
name "PCM Playback Volume"
card $CARD
}
}
@ -55,25 +101,27 @@ ICH.pcm.surround40.0 {
ICH.pcm.surround51.0 {
@args [ CARD ]
@args.CARD {
type string
type integer
}
type route
ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
type softvol
slave.pcm {
type hooks
type route
ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
type hooks
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
name "Line-In As Surround"
preserve true
@ -102,10 +150,15 @@ ICH.pcm.surround51.0 {
lock true
optional true
}
]
]
}
}
slave.channels 6
}
control {
name "PCM Playback Volume"
card $CARD
}
slave.channels 6
}
<confdir:pcm/iec958.conf>

View file

@ -7,11 +7,50 @@
ICH4.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
type integer
}
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
control {
name "PCM Playback Volume"
card $CARD
}
}
# with dmix?
ICH4.pcm.default {
@args [ CARD ]
@args.CARD {
type integer
}
type asym
playback.pcm {
type plug
slave.pcm {
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
control {
name "PCM Playback Volume"
card $CARD
}
}
}
capture.pcm {
type plug
slave.pcm {
type hw
card $CARD
device 0
}
}
type hw
card $CARD
device 0
}
<confdir:pcm/surround40.conf>
@ -19,17 +58,19 @@ ICH4.pcm.front.0 {
ICH4.pcm.surround40.0 {
@args [ CARD ]
@args.CARD {
type string
type integer
}
type hooks
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
type hooks
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
name "Line-In As Surround"
preserve true
@ -44,7 +85,12 @@ ICH4.pcm.surround40.0 {
lock true
optional true
}
]
]
}
}
control {
name "PCM Playback Volume"
card $CARD
}
}
@ -55,25 +101,27 @@ ICH4.pcm.surround40.0 {
ICH4.pcm.surround51.0 {
@args [ CARD ]
@args.CARD {
type string
type integer
}
type route
ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
type softvol
slave.pcm {
type hooks
type route
ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
type hooks
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
name "Line-In As Surround"
preserve true
@ -102,10 +150,15 @@ ICH4.pcm.surround51.0 {
lock true
optional true
}
]
]
}
}
slave.channels 6
}
control {
name "PCM Playback Volume"
card $CARD
}
slave.channels 6
}
<confdir:pcm/iec958.conf>

View file

@ -7,11 +7,50 @@
NFORCE.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
type integer
}
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
control {
name "PCM Playback Volume"
card $CARD
}
}
# with dmix?
NFORCE.pcm.default {
@args [ CARD ]
@args.CARD {
type integer
}
type asym
playback.pcm {
type plug
slave.pcm {
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
control {
name "PCM Playback Volume"
card $CARD
}
}
}
capture.pcm {
type plug
slave.pcm {
type hw
card $CARD
device 0
}
}
type hw
card $CARD
device 0
}
<confdir:pcm/surround40.conf>
@ -19,17 +58,19 @@ NFORCE.pcm.front.0 {
NFORCE.pcm.surround40.0 {
@args [ CARD ]
@args.CARD {
type string
type integer
}
type hooks
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
type hooks
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
name "Line-In As Surround"
preserve true
@ -44,7 +85,12 @@ NFORCE.pcm.surround40.0 {
lock true
optional true
}
]
]
}
}
control {
name "PCM Playback Volume"
card $CARD
}
}
@ -55,25 +101,27 @@ NFORCE.pcm.surround40.0 {
NFORCE.pcm.surround51.0 {
@args [ CARD ]
@args.CARD {
type string
type integer
}
type route
ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
type softvol
slave.pcm {
type hooks
type route
ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
type hooks
slave.pcm {
type hw
card $CARD
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
name "Line-In As Surround"
preserve true
@ -102,10 +150,15 @@ NFORCE.pcm.surround51.0 {
lock true
optional true
}
]
]
}
}
slave.channels 6
}
control {
name "PCM Playback Volume"
card $CARD
}
slave.channels 6
}
<confdir:pcm/iec958.conf>