]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
chtnau8824: Add support for using the SOF driver
authorHans de Goede <hdegoede@redhat.com>
Wed, 16 Dec 2020 15:38:38 +0000 (16:38 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 25 Jan 2021 10:34:19 +0000 (11:34 +0100)
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>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/chtnau8824/HiFi.conf
ucm2/codecs/nau8824/EnableSeq.conf

index b36588f25c81cf9d0111f665e032f12e8056e1df..c3d830dc3d4ceeb6f546cbebe9c4be707a41d99d 100644 (file)
@@ -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
        }
 }
 
index 3650d06485b44f53d2f4563bb7c3ba43a09bf626..660856fe451bff90500ddb6f8c30a95d5de4ba2e 100644 (file)
@@ -1,7 +1,7 @@
 EnableSequence [
        # Playback TDM configuration
        cset "name='DACL Channel Source' 0"
-       cset "name='DACR Channel Source' 1"
+       cset "name='DACR Channel Source' ${var:RightOutputChannel}"
        # Input Configuration
        cset "name='DMIC1 Enable Switch' off"
        cset "name='DMIC2 Enable Switch' off"