From 3087158e5cdfd407f9b82b2b6847e7ed483d90c9 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 27 Oct 2023 17:27:33 +0200 Subject: [PATCH] ucm2: codecs: wsa884x: add codec sequences Add enable and disable codec sequence for wsa884x codecs in two and four speaker configurations. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jaroslav Kysela --- .../four-speakers/DefaultEnableSeq.conf | 26 +++++++++ .../wsa884x/four-speakers/SpeakerSeq.conf | 53 +++++++++++++++++++ ucm2/codecs/wsa884x/four-speakers/init.conf | 13 +++++ .../wsa884x/two-speakers/SpeakerSeq.conf | 29 ++++++++++ ucm2/codecs/wsa884x/two-speakers/init.conf | 11 ++++ 5 files changed, 132 insertions(+) create mode 100644 ucm2/codecs/wsa884x/four-speakers/DefaultEnableSeq.conf create mode 100644 ucm2/codecs/wsa884x/four-speakers/SpeakerSeq.conf create mode 100644 ucm2/codecs/wsa884x/four-speakers/init.conf create mode 100644 ucm2/codecs/wsa884x/two-speakers/SpeakerSeq.conf create mode 100644 ucm2/codecs/wsa884x/two-speakers/init.conf diff --git a/ucm2/codecs/wsa884x/four-speakers/DefaultEnableSeq.conf b/ucm2/codecs/wsa884x/four-speakers/DefaultEnableSeq.conf new file mode 100644 index 0000000..a8316bd --- /dev/null +++ b/ucm2/codecs/wsa884x/four-speakers/DefaultEnableSeq.conf @@ -0,0 +1,26 @@ +EnableSequence [ + cset "name='WooferLeft COMP Switch' 1" + cset "name='WooferLeft BOOST Switch' 1" + cset "name='WooferLeft DAC Switch' 1" + cset "name='WooferLeft PBR Switch' 1" + cset "name='WooferLeft VISENSE Switch' 0" + cset "name='WooferLeft WSA MODE' 0" + cset "name='TwitterLeft COMP Switch' 1" + cset "name='TwitterLeft BOOST Switch' 1" + cset "name='TwitterLeft DAC Switch' 1" + cset "name='TwitterLeft PBR Switch' 1" + cset "name='TwitterLeft VISENSE Switch' 0" + cset "name='TwitterLeft WSA MODE' 0" + cset "name='WooferRight COMP Switch' 1" + cset "name='WooferRight BOOST Switch' 1" + cset "name='WooferRight DAC Switch' 1" + cset "name='WooferRight PBR Switch' 1" + cset "name='WooferRight VISENSE Switch' 0" + cset "name='WooferRight WSA MODE' 0" + cset "name='TwitterRight COMP Switch' 1" + cset "name='TwitterRight BOOST Switch' 1" + cset "name='TwitterRight DAC Switch' 1" + cset "name='TwitterRight PBR Switch' 1" + cset "name='TwitterRight VISENSE Switch' 0" + cset "name='TwitterRight WSA MODE' 0" +] diff --git a/ucm2/codecs/wsa884x/four-speakers/SpeakerSeq.conf b/ucm2/codecs/wsa884x/four-speakers/SpeakerSeq.conf new file mode 100644 index 0000000..7a37062 --- /dev/null +++ b/ucm2/codecs/wsa884x/four-speakers/SpeakerSeq.conf @@ -0,0 +1,53 @@ +EnableSequence [ + cset "name='WooferLeft COMP Switch' 1" + cset "name='WooferLeft BOOST Switch' 1" + cset "name='WooferLeft DAC Switch' 1" + cset "name='WooferLeft PBR Switch' 1" + cset "name='WooferLeft VISENSE Switch' 0" + cset "name='WooferLeft WSA MODE' 0" + cset "name='WooferLeft PA Volume' 12" + cset "name='TwitterLeft COMP Switch' 1" + cset "name='TwitterLeft BOOST Switch' 1" + cset "name='TwitterLeft DAC Switch' 1" + cset "name='TwitterLeft PBR Switch' 1" + cset "name='TwitterLeft VISENSE Switch' 0" + cset "name='TwitterLeft WSA MODE' 0" + cset "name='TwitterLeft PA Volume' 12" + cset "name='WooferRight COMP Switch' 1" + cset "name='WooferRight BOOST Switch' 1" + cset "name='WooferRight DAC Switch' 1" + cset "name='WooferRight PBR Switch' 1" + cset "name='WooferRight VISENSE Switch' 0" + cset "name='WooferRight WSA MODE' 0" + cset "name='WooferRight PA Volume' 12" + cset "name='TwitterRight COMP Switch' 1" + cset "name='TwitterRight BOOST Switch' 1" + cset "name='TwitterRight DAC Switch' 1" + cset "name='TwitterRight PBR Switch' 1" + cset "name='TwitterRight VISENSE Switch' 0" + cset "name='TwitterRight WSA MODE' 0" + cset "name='TwitterRight PA Volume' 12" +] + +DisableSequence [ + cset "name='WooferLeft COMP Switch' 0" + cset "name='WooferLeft BOOST Switch' 0" + cset "name='WooferLeft DAC Switch' 0" + cset "name='WooferLeft PBR Switch' 0" + cset "name='WooferLeft VISENSE Switch' 0" + cset "name='TwitterLeft COMP Switch' 0" + cset "name='TwitterLeft BOOST Switch' 0" + cset "name='TwitterLeft DAC Switch' 0" + cset "name='TwitterLeft PBR Switch' 0" + cset "name='TwitterLeft VISENSE Switch' 0" + cset "name='WooferRight COMP Switch' 0" + cset "name='WooferRight BOOST Switch' 0" + cset "name='WooferRight DAC Switch' 0" + cset "name='WooferRight PBR Switch' 0" + cset "name='WooferRight VISENSE Switch' 0" + cset "name='TwitterRight COMP Switch' 0" + cset "name='TwitterRight BOOST Switch' 0" + cset "name='TwitterRight DAC Switch' 0" + cset "name='TwitterRight PBR Switch' 0" + cset "name='TwitterRight VISENSE Switch' 0" +] diff --git a/ucm2/codecs/wsa884x/four-speakers/init.conf b/ucm2/codecs/wsa884x/four-speakers/init.conf new file mode 100644 index 0000000..22349ea --- /dev/null +++ b/ucm2/codecs/wsa884x/four-speakers/init.conf @@ -0,0 +1,13 @@ +# WSA884x in four-speaker configuration, specific volume control settings +LibraryConfig.remap.Config { + ctl.default.map { + # Merge four mono controls into one + "name='Speakers Volume'" { + "name='WooferLeft PA Volume'".vindex.0 0 + "name='TwitterLeft PA Volume'".vindex.1 0 + "name='WooferRight PA Volume'".vindex.2 0 + "name='TwitterRight PA Volume'".vindex.3 0 + } + } +} + diff --git a/ucm2/codecs/wsa884x/two-speakers/SpeakerSeq.conf b/ucm2/codecs/wsa884x/two-speakers/SpeakerSeq.conf new file mode 100644 index 0000000..e86ea21 --- /dev/null +++ b/ucm2/codecs/wsa884x/two-speakers/SpeakerSeq.conf @@ -0,0 +1,29 @@ +EnableSequence [ + cset "name='SpkrLeft COMP Switch' 1" + cset "name='SpkrLeft BOOST Switch' 1" + cset "name='SpkrLeft DAC Switch' 1" + cset "name='SpkrLeft PBR Switch' 1" + cset "name='SpkrLeft VISENSE Switch' 0" + cset "name='SpkrLeft WSA MODE' 0" + cset "name='SpkrLeft PA Volume' 12" + cset "name='SpkrRight COMP Switch' 1" + cset "name='SpkrRight BOOST Switch' 1" + cset "name='SpkrRight DAC Switch' 1" + cset "name='SpkrRight PBR Switch' 1" + cset "name='SpkrRight VISENSE Switch' 0" + cset "name='SpkrRight WSA MODE' 0" + cset "name='SpkrRight PA Volume' 12" +] + +DisableSequence [ + cset "name='SpkrLeft COMP Switch' 0" + cset "name='SpkrLeft BOOST Switch' 0" + cset "name='SpkrLeft DAC Switch' 0" + cset "name='SpkrLeft PBR Switch' 0" + cset "name='SpkrLeft VISENSE Switch' 0" + cset "name='SpkrRight COMP Switch' 0" + cset "name='SpkrRight BOOST Switch' 0" + cset "name='SpkrRight DAC Switch' 0" + cset "name='SpkrRight PBR Switch' 0" + cset "name='SpkrRight VISENSE Switch' 0" +] diff --git a/ucm2/codecs/wsa884x/two-speakers/init.conf b/ucm2/codecs/wsa884x/two-speakers/init.conf new file mode 100644 index 0000000..b6477a4 --- /dev/null +++ b/ucm2/codecs/wsa884x/two-speakers/init.conf @@ -0,0 +1,11 @@ +# WSA884x in two-speaker configuration, specific volume control settings +LibraryConfig.remap.Config { + ctl.default.map { + # Merge two mono controls into one stereo + "name='Speakers Volume'" { + "name='SpkrLeft PA Volume'".vindex.0 0 + "name='SpkrRight PA Volume'".vindex.1 0 + } + } +} + -- 2.47.1