mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-28 07:00:15 -05:00
conf: Move UCM profile snippets into components subdirectory
We have placed UCM profile snippets to be included by the main config files also in the same directory, src/conf/ucm, it confuses alsaucm program that scans over all subdirectories. It thinks such a file is also the main config file, and spews errors like: % alsaucm ALSA lib utils.c:67:(uc_mgr_config_load) could not open configuration file /usr/share/alsa/ucm/bytcr/bytcr.conf ALSA lib parser.c:1427:(load_master_config) error: could not parse configuration for card bytcr alsaucm: unable to obtain card list: No such file or directory Actually we already defined the subdirectory for such components, and they are skipped at parsing the main configs. So we just need to move the files there -- this is what's done here. One more thing done here is to add a new component subdirectory, platforms, for definitions bytcr/* that don't match with neither the existing ones (codecs nor dsps). Suggested-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
7ca1f6e78c
commit
d48adc2a20
52 changed files with 147 additions and 138 deletions
54
src/conf/ucm/codecs/rt5651/EnableSeq.conf
Normal file
54
src/conf/ucm/codecs/rt5651/EnableSeq.conf
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# default state
|
||||
cset "name='HPO MIX DAC1 Switch' on"
|
||||
cset "name='HPO MIX HPVOL Switch' off"
|
||||
cset "name='HPO L Playback Switch' off"
|
||||
cset "name='HPO R Playback Switch' off"
|
||||
cset "name='HPOVOL L Switch' on"
|
||||
cset "name='HPOVOL R Switch' on"
|
||||
cset "name='LOUT MIX DAC L1 Switch' on"
|
||||
cset "name='LOUT MIX DAC R1 Switch' on"
|
||||
cset "name='IF1 ASRC Switch' on"
|
||||
cset "name='LOUT L Playback Switch' off"
|
||||
cset "name='LOUT R Playback Switch' off"
|
||||
cset "name='Stereo DAC MIXL DAC L1 Switch' on"
|
||||
cset "name='Stereo DAC MIXL DAC R1 Switch' off"
|
||||
cset "name='Stereo DAC MIXR DAC L1 Switch' off"
|
||||
cset "name='Stereo DAC MIXR DAC R1 Switch' on"
|
||||
cset "name='Stereo1 ADC MIXR ADC1 Switch' on"
|
||||
cset "name='Stereo1 ADC MIXR ADC2 Switch' on"
|
||||
cset "name='Stereo2 ADC MIXL ADC1 Switch' on"
|
||||
cset "name='Stereo2 ADC MIXL ADC2 Switch' on"
|
||||
cset "name='Stereo2 ADC MIXR ADC1 Switch' on"
|
||||
cset "name='Stereo2 ADC MIXR ADC2 Switch' on"
|
||||
cset "name='Headphone Switch' off"
|
||||
cset "name='Speaker Switch' off"
|
||||
|
||||
# volumes
|
||||
cset "name='OUT Playback Volume' 31"
|
||||
cset "name='HP Playback Volume' 31"
|
||||
cset "name='DAC1 Playback Volume' 175"
|
||||
cset "name='IN Capture Volume' 23"
|
||||
# 47=0dB, 0.375 dB/step, set it to 6 dB to help with soft mics
|
||||
cset "name='ADC Capture Volume' 63"
|
||||
cset "name='ADC Capture Switch' on"
|
||||
# Set ADC Boost Gain to 3dB higher vals result in too much noise
|
||||
cset "name='ADC Boost Gain' 1"
|
||||
# Set IN1, IN2 and IN3 internal mic boost to 1
|
||||
cset "name='IN1 Boost' 1"
|
||||
cset "name='IN2 Boost' 1"
|
||||
cset "name='IN3 Boost' 1"
|
||||
|
||||
# input
|
||||
cset "name='Stereo1 ADC L1 Mux' ADC"
|
||||
cset "name='Stereo1 ADC R1 Mux' ADC"
|
||||
cset "name='Stereo1 ADC MIXL ADC1 Switch' on"
|
||||
cset "name='Stereo1 ADC MIXR ADC1 Switch' on"
|
||||
cset "name='RECMIXL BST1 Switch' off"
|
||||
cset "name='RECMIXR BST1 Switch' off"
|
||||
cset "name='RECMIXL BST3 Switch' off"
|
||||
cset "name='RECMIXR BST3 Switch' off"
|
||||
cset "name='RECMIXL BST2 Switch' off"
|
||||
cset "name='RECMIXR BST2 Switch' off"
|
||||
cset "name='Headset Mic Switch' off"
|
||||
cset "name='Internal Mic Switch' off"
|
||||
cset "name='Line In Switch' off"
|
||||
42
src/conf/ucm/codecs/rt5651/HeadPhones-swapped.conf
Normal file
42
src/conf/ucm/codecs/rt5651/HeadPhones-swapped.conf
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
SectionDevice."Headphones" {
|
||||
Comment "Headphones"
|
||||
|
||||
ConflictingDevice [
|
||||
"Speaker"
|
||||
"MonoSpeaker"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
|
||||
# Swap left and right
|
||||
cset "name='Stereo DAC MIXL DAC R1 Switch' on"
|
||||
cset "name='Stereo DAC MIXL DAC L1 Switch' off"
|
||||
cset "name='Stereo DAC MIXR DAC L1 Switch' on"
|
||||
cset "name='Stereo DAC MIXR DAC R1 Switch' off"
|
||||
|
||||
cset "name='Headphone Switch' on"
|
||||
cset "name='HPO L Playback Switch' on"
|
||||
cset "name='HPO R Playback Switch' on"
|
||||
# Done after turning the HP on to keep the bias and clk on
|
||||
cset "name='Speaker Switch' off"
|
||||
cset "name='LOUT L Playback Switch' off"
|
||||
cset "name='LOUT R Playback Switch' off"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
# Disabling the HP switches is done by the Speaker EnableSeq
|
||||
|
||||
# Unswap left and right
|
||||
cset "name='Stereo DAC MIXL DAC L1 Switch' on"
|
||||
cset "name='Stereo DAC MIXL DAC R1 Switch' off"
|
||||
cset "name='Stereo DAC MIXR DAC R1 Switch' on"
|
||||
cset "name='Stereo DAC MIXR DAC L1 Switch' off"
|
||||
]
|
||||
|
||||
Value {
|
||||
PlaybackChannels "2"
|
||||
JackControl "Headphone Jack"
|
||||
}
|
||||
}
|
||||
32
src/conf/ucm/codecs/rt5651/HeadPhones.conf
Normal file
32
src/conf/ucm/codecs/rt5651/HeadPhones.conf
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
SectionDevice."Headphones" {
|
||||
Comment "Headphones"
|
||||
|
||||
ConflictingDevice [
|
||||
"Speaker"
|
||||
"MonoSpeaker"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
cset "name='Headphone Switch' on"
|
||||
cset "name='HPO L Playback Switch' on"
|
||||
cset "name='HPO R Playback Switch' on"
|
||||
# Done after turning the HP on to keep the bias and clk on
|
||||
cset "name='Speaker Switch' off"
|
||||
cset "name='LOUT L Playback Switch' off"
|
||||
cset "name='LOUT R Playback Switch' off"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
# This is done by the Speaker EnableSequence, so that the
|
||||
# Platform Clock and BIAS do not temporarily get turned off
|
||||
# as that breaks audio-streams which are playing when
|
||||
# switching between Speaker/Headphone
|
||||
]
|
||||
|
||||
Value {
|
||||
PlaybackChannels "2"
|
||||
JackControl "Headphone Jack"
|
||||
}
|
||||
}
|
||||
27
src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf
Normal file
27
src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
SectionDevice."InternalMic-IN1" {
|
||||
Comment "Internal Microphone on IN1"
|
||||
|
||||
ConflictingDevice [
|
||||
"InternalMic-IN2"
|
||||
"InternalMic-IN12"
|
||||
"HeadsetMic-IN3"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
cset "name='Internal Mic Switch' on"
|
||||
cset "name='RECMIXL BST1 Switch' on"
|
||||
cset "name='RECMIXR BST1 Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
cset "name='Internal Mic Switch' off"
|
||||
cset "name='RECMIXL BST1 Switch' off"
|
||||
cset "name='RECMIXR BST1 Switch' off"
|
||||
]
|
||||
|
||||
Value {
|
||||
CaptureChannels "2"
|
||||
}
|
||||
}
|
||||
31
src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf
Normal file
31
src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
SectionDevice."InternalMic-IN12" {
|
||||
Comment "Internal Microphones on IN1 and IN2"
|
||||
|
||||
ConflictingDevice [
|
||||
"InternalMic-IN1"
|
||||
"InternalMic-IN2"
|
||||
"HeadsetMic-IN3"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
cset "name='Internal Mic Switch' on"
|
||||
cset "name='RECMIXL BST1 Switch' on"
|
||||
cset "name='RECMIXR BST1 Switch' on"
|
||||
cset "name='RECMIXL BST2 Switch' on"
|
||||
cset "name='RECMIXR BST2 Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
cset "name='Internal Mic Switch' off"
|
||||
cset "name='RECMIXL BST1 Switch' off"
|
||||
cset "name='RECMIXR BST1 Switch' off"
|
||||
cset "name='RECMIXL BST2 Switch' off"
|
||||
cset "name='RECMIXR BST2 Switch' off"
|
||||
]
|
||||
|
||||
Value {
|
||||
CaptureChannels "2"
|
||||
}
|
||||
}
|
||||
27
src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf
Normal file
27
src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
SectionDevice."InternalMic-IN2" {
|
||||
Comment "Internal Microphone on IN2"
|
||||
|
||||
ConflictingDevice [
|
||||
"InternalMic-IN1"
|
||||
"InternalMic-IN12"
|
||||
"HeadsetMic-IN3"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
cset "name='Internal Mic Switch' on"
|
||||
cset "name='RECMIXL BST2 Switch' on"
|
||||
cset "name='RECMIXR BST2 Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
cset "name='Internal Mic Switch' off"
|
||||
cset "name='RECMIXL BST2 Switch' off"
|
||||
cset "name='RECMIXR BST2 Switch' off"
|
||||
]
|
||||
|
||||
Value {
|
||||
CaptureChannels "2"
|
||||
}
|
||||
}
|
||||
28
src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf
Normal file
28
src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
SectionDevice."HeadsetMic-IN3" {
|
||||
Comment "Headset Microphone"
|
||||
|
||||
ConflictingDevice [
|
||||
"InternalMic-IN1"
|
||||
"InternalMic-IN2"
|
||||
"InternalMic-IN12"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
cset "name='Headset Mic Switch' on"
|
||||
cset "name='RECMIXL BST3 Switch' on"
|
||||
cset "name='RECMIXR BST3 Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
cset "name='Headset Mic Switch' off"
|
||||
cset "name='RECMIXL BST3 Switch' off"
|
||||
cset "name='RECMIXR BST3 Switch' off"
|
||||
]
|
||||
|
||||
Value {
|
||||
CaptureChannels "2"
|
||||
JackControl "Headset Mic Jack"
|
||||
}
|
||||
}
|
||||
6
src/conf/ucm/codecs/rt5651/Makefile.am
Normal file
6
src/conf/ucm/codecs/rt5651/Makefile.am
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
alsaconfigdir = @ALSA_CONFIG_DIR@
|
||||
ucmdir = $(alsaconfigdir)/ucm/codecs/rt5651
|
||||
ucm_DATA = EnableSeq.conf HeadPhones.conf HeadPhones-swapped.conf \
|
||||
IN1-InternalMic.conf IN2-InternalMic.conf IN12-InternalMic.conf \
|
||||
IN3-HeadsetMic.conf Speaker.conf MonoSpeaker.conf
|
||||
EXTRA_DIST = $(ucm_DATA)
|
||||
36
src/conf/ucm/codecs/rt5651/MonoSpeaker.conf
Normal file
36
src/conf/ucm/codecs/rt5651/MonoSpeaker.conf
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
SectionDevice."MonoSpeaker" {
|
||||
Comment "Mono Speaker"
|
||||
|
||||
ConflictingDevice [
|
||||
"Speaker"
|
||||
"Headphones"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
|
||||
# Map left and right input on left
|
||||
cset "name='Stereo DAC MIXR DAC R1 Switch' off"
|
||||
cset "name='Stereo DAC MIXL DAC R1 Switch' on"
|
||||
|
||||
cset "name='Speaker Switch' on"
|
||||
cset "name='LOUT L Playback Switch' on"
|
||||
# Done after turning the speaker on to keep the bias and clk on
|
||||
cset "name='Headphone Switch' off"
|
||||
cset "name='HPO L Playback Switch' off"
|
||||
cset "name='HPO R Playback Switch' off"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
# Disabling the switches is done by the Speaker EnableSeq
|
||||
|
||||
# Undo mono mapping
|
||||
cset "name='Stereo DAC MIXL DAC R1 Switch' off"
|
||||
cset "name='Stereo DAC MIXR DAC R1 Switch' on"
|
||||
]
|
||||
|
||||
Value {
|
||||
PlaybackChannels "2"
|
||||
}
|
||||
}
|
||||
31
src/conf/ucm/codecs/rt5651/Speaker.conf
Normal file
31
src/conf/ucm/codecs/rt5651/Speaker.conf
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
SectionDevice."Speaker" {
|
||||
Comment "Speakers"
|
||||
|
||||
ConflictingDevice [
|
||||
"MonoSpeaker"
|
||||
"Headphones"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
cset "name='Speaker Switch' on"
|
||||
cset "name='LOUT L Playback Switch' on"
|
||||
cset "name='LOUT R Playback Switch' on"
|
||||
# Done after turning the speaker on to keep the bias and clk on
|
||||
cset "name='Headphone Switch' off"
|
||||
cset "name='HPO L Playback Switch' off"
|
||||
cset "name='HPO R Playback Switch' off"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:bytcrrt5651"
|
||||
# This is done by the Headphones EnableSequence, so that the
|
||||
# Platform Clock and BIAS do not temporarily get turned off
|
||||
# as that breaks audio-streams which are playing when
|
||||
# switching between Speaker/Headphone
|
||||
]
|
||||
|
||||
Value {
|
||||
PlaybackChannels "2"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue