@@ -1,6 +1,7 @@
Define.Speaker "Speaker"
Define.Mic "InternalMic"
Define.SST "yes"
+Define.RightOutputChannel "1"
If.Controls {
Condition {
@@ -9,6 +10,7 @@ If.Controls {
}
False {
Define.SST ""
+ Define.RightOutputChannel "0"
}
}
@@ -13,7 +13,7 @@ SectionDevice."Headphones" {
EnableSequence [
cset "name='DACL Channel Source' 0"
- cset "name='DACR Channel Source' 1"
+ cset "name='DACR Channel Source' ${var:RightOutputChannel}"
cset "name='Headphone Switch' on"
]
@@ -12,7 +12,7 @@ SectionDevice."Speaker" {
EnableSequence [
cset "name='DACL Channel Source' 0"
- cset "name='DACR Channel Source' 1"
+ cset "name='DACR Channel Source' ${var:RightOutputChannel}"
# nau8824 mono speaker boards have the speaker on the right chan
cset "name='Speaker Left DACL Volume' 0"
cset "name='Speaker Left DACR Volume' 0"
@@ -12,7 +12,7 @@ SectionDevice."Speaker" {
EnableSequence [
cset "name='DACL Channel Source' 0"
- cset "name='DACR Channel Source' 1"
+ cset "name='DACR Channel Source' ${var:RightOutputChannel}"
cset "name='Speaker Left DACL Volume' 1"
cset "name='Speaker Left DACR Volume' 0"
cset "name='Speaker Right DACL Volume' 0"
The old (and currently the default) SST driver uses TDM 4 slots 24 bit as wire format to the codec. Where as the new SOF driver uses standard I2S 2 channel 24 bit. Normally this should not impact the UCM settings, but on the NAU8824 the "DAC Right Channel Source" mixer setting must be set to 1 when using TDM 4 slots and to 0 when using I2S 2 channel mode. Getting this wrong (in either case) results in the right channel not outputting any sound. This commit introduces a RightOutputChannel variable which gets set to 0/1 depending on the driver and then uses that for the "DAC Right Channel Source" mixer setting so that we do the right thing depending on the driver. This has been tested on the following devices: Medion E2215T: Stereo speakers, analog mic Medion E2228T: Stereo speakers, stereo digital mics Cube iWork 8 Air: Mono speaker, analog mic Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- ucm2/chtnau8824/HiFi.conf | 2 ++ ucm2/codecs/nau8824/HeadPhones.conf | 2 +- ucm2/codecs/nau8824/MonoSpeaker.conf | 2 +- ucm2/codecs/nau8824/Speaker.conf | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-)