aboutsummaryrefslogtreecommitdiff
path: root/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf
blob: db866cd5c67a0e26b8529298112ab8a543237d29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
SectionVerb {
	# ALSA PCM
	Value {
		TQ "HiFi"
	}

	EnableSequence [
		<platforms/bytcr/PlatformEnableSeq.conf>
		<codecs/rt5645/EnableSeq.conf>

		cset "name='Stereo1 ADC1 Mux' 1"
		cset "name='I2S2 Func Switch' on"
		# 3/12 the headphone mic tends to be quite loud
		cset "name='IN1 Boost' 3"
		# 8/8 the internal analog mic tends to be quite soft
		cset "name='IN2 Boost' 8"
	]

	DisableSequence [
		<codecs/rt5645/DisableSeq.conf>
	]
}

SectionDevice."Speaker" {
	Comment "Speaker"

	Value {
		PlaybackPriority 100
		PlaybackPCM "hw:${CardId}"
	}

	ConflictingDevice [
		"Headphones"
	]

	EnableSequence [
		# Monospeaker: Mix right to left
		cset "name='Stereo DAC MIXL DAC R1 Switch' 1"
		cset "name='Stereo DAC MIXR DAC R1 Switch' 0"

		<codecs/rt5645/SpeakerEnableSeq.conf>
	]

	DisableSequence [
		cset "name='Ext Spk Switch' off"
		cset "name='Speaker Channel Switch' off"
	]
}

SectionDevice."Headphones" {
	Comment "Headphones"

	Value {
		PlaybackPriority 200
		PlaybackPCM "hw:${CardId}"
		JackControl "Headphone Jack"
		JackHWMute "Speaker"
	}

	ConflictingDevice [
		"Speaker"
	]

	EnableSequence [
		# Undo monospeaker mixing
		cset "name='Stereo DAC MIXL DAC R1 Switch' 0"
		cset "name='Stereo DAC MIXR DAC R1 Switch' 1"

		<codecs/rt5645/HeadphonesEnableSeq.conf>
	]

	DisableSequence [
		cset "name='Headphone Switch' off"
		cset "name='Headphone Channel Switch' off"
	]
}

<codecs/rt5645/AnalogMic.conf>

SectionDevice."Headset" {
	Comment "Headset Microphone"

	Value {
		CapturePriority 200
		CapturePCM "hw:${CardId}"
		JackControl "Headset Mic Jack"
		JackHWMute "Mic"
	}

	EnableSequence [
		<codecs/rt5645/HSMicEnableSeq.conf>

		cset "name='Sto1 ADC MIXL ADC2 Switch' off"
		cset "name='Sto1 ADC MIXR ADC2 Switch' off"

		cset "name='Mono ADC MIXL ADC1 Switch' on"
		cset "name='Mono ADC MIXR ADC1 Switch' on"
		cset "name='Mono ADC MIXL ADC2 Switch' off"
		cset "name='Mono ADC MIXR ADC2 Switch' off"
	]

	DisableSequence [
		<codecs/rt5645/HSMicDisableSeq.conf>
	]
}