OSDN Git Service

bytcr-rt5640: Add support for devices without speakers and/or an internal mic
authorHans de Goede <hdegoede@redhat.com>
Sat, 9 Jan 2021 21:02:51 +0000 (22:02 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 11 Jan 2021 18:57:50 +0000 (19:57 +0100)
commitbdd05ac3396a3a09f3818aaa9157eb7ef07676d6
treee8d15618827995d74aa70c201f0401cde514dca7
parent5634db4be3ed435f3e59f30a71c3c3711162929d
bytcr-rt5640: Add support for devices without speakers and/or an internal mic

There are kernel patches pending upstream for the bytcr-rt5640 machine-driver
to support devices without speakers and/or an internal mic.

Since the UCM profile already conditionally loads the speaker and
internal-mic codec include files, these will simply get skipped in this
case, so this almost works with the current UCM profile without changes.

The only troublesome part is the ConflictingDevice sections in the codec
HeadPhones.conf and HeadsetMic.conf files, which refer to resp. a "Speaker"
and a "Mic" device. Without any of the speaker or mic codec conf files
being included there will not by any "Speaker" / "Mic" devices leading
to an error while parsing the HeadPhones.conf / HeadsetMic.conf files.

This commit makes the ConflictingDevice section conditional, fixing this.

Cc: Rasmus Porsager <rasmus@beat.dk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/bytcr-rt5640/HiFi-Components.conf
ucm2/bytcr-rt5640/HiFi-LongName.conf
ucm2/codecs/rt5640/HeadPhones.conf
ucm2/codecs/rt5640/HeadsetMic.conf