mirror of
https://github.com/torvalds/linux.git
synced 2026-04-19 23:34:00 -04:00
Obtain all test parameters from the configuration files. The defaults are defined in the pcm-test.conf file. The test count and parameters may be variable per specific hardware. Also, handle alt_formats field now (with the fixes in the format loop). It replaces the original "automatic" logic which is not so universal. The code may be further extended to skip various tests based on the configuration hints, if the exact PCM hardware parameters are not available for the given hardware. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20221208-alsa-pcm-test-hacks-v4-2-5a152e65b1e1@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
85 lines
1.4 KiB
Plaintext
85 lines
1.4 KiB
Plaintext
#
|
|
# Example configuration for Lenovo ThinkPad P1 Gen2
|
|
#
|
|
|
|
#
|
|
# Use regex match for the string read from the given sysfs path
|
|
#
|
|
# The sysfs root directory (/sys) is hardwired in the test code
|
|
# (may be changed on demand).
|
|
#
|
|
# All strings must match.
|
|
#
|
|
sysfs [
|
|
{
|
|
path "class/dmi/id/product_sku"
|
|
regex "LENOVO_MT_20QU_BU_Think_FM_ThinkPad P1 Gen 2"
|
|
}
|
|
]
|
|
|
|
card.hda {
|
|
#
|
|
# Use regex match for the /sys/class/sound/card*/ tree (relative)
|
|
#
|
|
sysfs [
|
|
{
|
|
path "device/subsystem_device"
|
|
regex "0x229e"
|
|
}
|
|
{
|
|
path "device/subsystem_vendor"
|
|
regex "0x17aa"
|
|
}
|
|
]
|
|
|
|
#
|
|
# PCM configuration
|
|
#
|
|
# pcm.0.0 - device 0 subdevice 0
|
|
#
|
|
pcm.0.0 {
|
|
PLAYBACK {
|
|
test.time1 {
|
|
access RW_INTERLEAVED # can be omitted - default
|
|
format S16_LE # can be omitted - default
|
|
rate 48000 # can be omitted - default
|
|
channels 2 # can be omitted - default
|
|
period_size 512
|
|
buffer_size 4096
|
|
}
|
|
test.time2 {
|
|
access RW_INTERLEAVED
|
|
format S16_LE
|
|
rate 48000
|
|
channels 2
|
|
period_size 24000
|
|
buffer_size 192000
|
|
}
|
|
test.time3 {
|
|
access RW_INTERLEAVED
|
|
format S16_LE
|
|
rate 44100
|
|
channels 2
|
|
period_size 24000
|
|
buffer_size 192000
|
|
}
|
|
}
|
|
CAPTURE {
|
|
# use default tests, check for the presence
|
|
}
|
|
}
|
|
#
|
|
# uncomment to force the missing device checks
|
|
#
|
|
#pcm.0.2 {
|
|
# PLAYBACK {
|
|
# # check for the presence
|
|
# }
|
|
#}
|
|
#pcm.0.3 {
|
|
# CAPTURE {
|
|
# # check for the presence
|
|
# }
|
|
#}
|
|
}
|