mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-11 21:14:07 +08:00
2635c22603
The indexes of the devices are described within the topology file, it is a possibility that the topology encodes invalid indexes when DYNAMIC_MINORS is not enabled in kernel: #define SNDRV_MINOR_COMPRESS 2 /* 2 - 3 */ #define SNDRV_MINOR_HWDEP 4 /* 4 - 7 */ #define SNDRV_MINOR_RAWMIDI 8 /* 8 - 15 */ #define SNDRV_MINOR_PCM_PLAYBACK 16 /* 16 - 23 */ #define SNDRV_MINOR_PCM_CAPTURE 24 /* 24 - 31 */ If the topology assigns an index greater than 7 for PLAYBACK/CAPTURE PCM then there will be minor number collision. As an example: card0 creates a capture PCM with index 10 -> minor = 34 card1 creates compress device with index 0 -> minor = 34 Card1 will fail to instantiate because the minor for the compress stream is already taken. To avoid seemingly mysterious issues with card creation, select the DYNAMIC_MINORS when the topology is enabled. The other option would be to try to do out of bound index checks in case of DYNAMIC_MINOR is not enabled and do not even attempt to create the device with failing the topology load. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210726182142.179604-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
104 lines
2.7 KiB
Plaintext
104 lines
2.7 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# SoC audio configuration
|
|
#
|
|
|
|
menuconfig SND_SOC
|
|
tristate "ALSA for SoC audio support"
|
|
select SND_PCM
|
|
select AC97_BUS if SND_SOC_AC97_BUS
|
|
select SND_JACK
|
|
select REGMAP_I2C if I2C
|
|
select REGMAP_SPI if SPI_MASTER
|
|
help
|
|
|
|
If you want ASoC support, you should say Y here and also to the
|
|
specific driver for your SoC platform below.
|
|
|
|
ASoC provides power efficient ALSA support for embedded battery powered
|
|
SoC based systems like PDA's, Phones and Personal Media Players.
|
|
|
|
This ASoC audio support can also be built as a module. If so, the module
|
|
will be called snd-soc-core.
|
|
|
|
if SND_SOC
|
|
|
|
config SND_SOC_AC97_BUS
|
|
bool
|
|
|
|
config SND_SOC_GENERIC_DMAENGINE_PCM
|
|
bool
|
|
select SND_DMAENGINE_PCM
|
|
|
|
config SND_SOC_COMPRESS
|
|
bool
|
|
select SND_COMPRESS_OFFLOAD
|
|
|
|
config SND_SOC_TOPOLOGY
|
|
bool
|
|
select SND_DYNAMIC_MINORS
|
|
|
|
config SND_SOC_TOPOLOGY_KUNIT_TEST
|
|
tristate "KUnit tests for SoC topology"
|
|
depends on KUNIT
|
|
depends on SND_SOC_TOPOLOGY
|
|
default KUNIT_ALL_TESTS
|
|
help
|
|
If you want to perform tests on ALSA SoC topology support say Y here.
|
|
|
|
This builds a module which can be later manually loaded to run KUNIT
|
|
test cases against soc-topology.c API. This should be primarily used
|
|
by developers to test their changes to ASoC.
|
|
|
|
Do note that it creates fake playback devices which do not interact
|
|
well with userspace. When running tests one may want to disable
|
|
userspace applications such as pulseaudio, to prevent unnecessary
|
|
problems.
|
|
|
|
config SND_SOC_ACPI
|
|
tristate
|
|
|
|
# All the supported SoCs
|
|
source "sound/soc/adi/Kconfig"
|
|
source "sound/soc/amd/Kconfig"
|
|
source "sound/soc/atmel/Kconfig"
|
|
source "sound/soc/au1x/Kconfig"
|
|
source "sound/soc/bcm/Kconfig"
|
|
source "sound/soc/cirrus/Kconfig"
|
|
source "sound/soc/dwc/Kconfig"
|
|
source "sound/soc/fsl/Kconfig"
|
|
source "sound/soc/hisilicon/Kconfig"
|
|
source "sound/soc/jz4740/Kconfig"
|
|
source "sound/soc/kirkwood/Kconfig"
|
|
source "sound/soc/img/Kconfig"
|
|
source "sound/soc/intel/Kconfig"
|
|
source "sound/soc/mediatek/Kconfig"
|
|
source "sound/soc/meson/Kconfig"
|
|
source "sound/soc/mxs/Kconfig"
|
|
source "sound/soc/pxa/Kconfig"
|
|
source "sound/soc/qcom/Kconfig"
|
|
source "sound/soc/rockchip/Kconfig"
|
|
source "sound/soc/samsung/Kconfig"
|
|
source "sound/soc/sh/Kconfig"
|
|
source "sound/soc/sof/Kconfig"
|
|
source "sound/soc/spear/Kconfig"
|
|
source "sound/soc/sprd/Kconfig"
|
|
source "sound/soc/sti/Kconfig"
|
|
source "sound/soc/stm/Kconfig"
|
|
source "sound/soc/sunxi/Kconfig"
|
|
source "sound/soc/tegra/Kconfig"
|
|
source "sound/soc/ti/Kconfig"
|
|
source "sound/soc/uniphier/Kconfig"
|
|
source "sound/soc/ux500/Kconfig"
|
|
source "sound/soc/xilinx/Kconfig"
|
|
source "sound/soc/xtensa/Kconfig"
|
|
|
|
# Supported codecs
|
|
source "sound/soc/codecs/Kconfig"
|
|
|
|
# generic frame-work
|
|
source "sound/soc/generic/Kconfig"
|
|
|
|
endif # SND_SOC
|
|
|