mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
The dmix plugin has some optimized implementations for x86 using the direct memory accesses, which was rather the original version, in addition to the "generic" implementation using the semaphore blocking. The x86 implementation relies on the memory coherency *and* the fast read/write on it. For other architectures, this has been always disabled just because of memory coherency. But, the recent LPE audio development revealed that, even on x86 platforms, the read/write performance might become extremely bad when the buffer is marked as uncached. Some drivers already know the buffer is uncached, we need to switch to the generic mode in such a case. This patch introduces yet another flag to dmix configuration, direct_memory_access, that indicates whether the x86-specific optimization can be used or not. Each driver can set the flag in its cards config namespace, and the default dmix config refers to it. As of this patch, only HDMI LPE Audio driver sets it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
88 lines
1.2 KiB
Text
88 lines
1.2 KiB
Text
#
|
|
# Configuration for the Intel HDMI/DP LPE audio
|
|
#
|
|
|
|
<confdir:pcm/front.conf>
|
|
|
|
HdmiLpeAudio.pcm.front.0 {
|
|
@args [ CARD ]
|
|
@args.CARD {
|
|
type string
|
|
}
|
|
type softvol
|
|
slave.pcm {
|
|
type hw
|
|
card $CARD
|
|
}
|
|
control {
|
|
name "PCM Playback Volume"
|
|
card $CARD
|
|
}
|
|
}
|
|
|
|
# uncached memory reads have a high penalty
|
|
HdmiLpeAudio.dmix.direct_memory_access false
|
|
|
|
# default with dmix+softvol
|
|
HdmiLpeAudio.pcm.default {
|
|
@args [ CARD ]
|
|
@args.CARD {
|
|
type string
|
|
}
|
|
type plug
|
|
slave.pcm {
|
|
type softvol
|
|
slave.pcm {
|
|
@func concat
|
|
strings [ "dmix:" $CARD ]
|
|
}
|
|
control {
|
|
name "PCM Playback Volume"
|
|
card $CARD
|
|
}
|
|
}
|
|
}
|
|
|
|
<confdir:pcm/surround40.conf>
|
|
<confdir:pcm/surround21.conf>
|
|
<confdir:pcm/surround41.conf>
|
|
<confdir:pcm/surround50.conf>
|
|
<confdir:pcm/surround51.conf>
|
|
|
|
<confdir:pcm/hdmi.conf>
|
|
|
|
HdmiLpeAudio.pcm.hdmi.0 {
|
|
@args [ CARD AES0 AES1 AES2 AES3 ]
|
|
@args.CARD {
|
|
type string
|
|
}
|
|
@args.AES0 {
|
|
type integer
|
|
}
|
|
@args.AES1 {
|
|
type integer
|
|
}
|
|
@args.AES2 {
|
|
type integer
|
|
}
|
|
@args.AES3 {
|
|
type integer
|
|
}
|
|
type hooks
|
|
slave.pcm {
|
|
type hw
|
|
card $CARD
|
|
}
|
|
hooks.0 {
|
|
type ctl_elems
|
|
hook_args [
|
|
{
|
|
interface PCM
|
|
name "IEC958 Playback Default"
|
|
lock true
|
|
preserve true
|
|
value [ $AES0 $AES1 $AES2 $AES3 ]
|
|
}
|
|
]
|
|
}
|
|
}
|