]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SDCA: Add companion amp Function
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 11 Nov 2025 14:06:17 +0000 (14:06 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 18 Nov 2025 18:54:13 +0000 (18:54 +0000)
Add companion amp into the list of allowed SDCA Functions. More work
will be required to fully support companion amp, but this will let parts
including companion amp functions boot and it is a good first step to
proper support.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Tested-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251111140617.2997454-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/sdca_function.h
sound/soc/sdca/sdca_functions.c

index 99cb978f7099b1fbcb7a2459fd5085227a4244cd..c97861508a158243bf5a509ff122aae85cfd972b 100644 (file)
@@ -64,6 +64,7 @@ struct sdca_function_desc;
  * @SDCA_FUNCTION_TYPE_RJ: Retaskable jack.
  * @SDCA_FUNCTION_TYPE_SIMPLE_JACK: Subset of UAJ.
  * @SDCA_FUNCTION_TYPE_HID: Human Interface Device, for e.g. buttons.
+ * @SDCA_FUNCTION_TYPE_COMPANION_AMP: Sources audio from another amp.
  * @SDCA_FUNCTION_TYPE_IMP_DEF: Implementation-defined function.
  *
  * SDCA Function Types from SDCA specification v1.0a Section 5.1.2
@@ -83,6 +84,7 @@ enum sdca_function_type {
        SDCA_FUNCTION_TYPE_RJ                           = 0x07,
        SDCA_FUNCTION_TYPE_SIMPLE_JACK                  = 0x08,
        SDCA_FUNCTION_TYPE_HID                          = 0x0A,
+       SDCA_FUNCTION_TYPE_COMPANION_AMP                = 0x0B,
        SDCA_FUNCTION_TYPE_IMP_DEF                      = 0x1F,
 };
 
@@ -96,6 +98,7 @@ enum sdca_function_type {
 #define        SDCA_FUNCTION_TYPE_RJ_NAME                      "RJ"
 #define        SDCA_FUNCTION_TYPE_SIMPLE_NAME                  "SimpleJack"
 #define        SDCA_FUNCTION_TYPE_HID_NAME                     "HID"
+#define        SDCA_FUNCTION_TYPE_COMPANION_AMP_NAME           "CompanionAmp"
 #define        SDCA_FUNCTION_TYPE_IMP_DEF_NAME                 "ImplementationDefined"
 
 /**
index 49b98fe2d85438d0925c0bf676683cf2c362a030..0fcc8e82041e29a50b12a585c65516dd040a820e 100644 (file)
@@ -79,6 +79,8 @@ static const char *get_sdca_function_name(u32 function_type)
                return SDCA_FUNCTION_TYPE_SPEAKER_MIC_NAME;
        case SDCA_FUNCTION_TYPE_RJ:
                return SDCA_FUNCTION_TYPE_RJ_NAME;
+       case SDCA_FUNCTION_TYPE_COMPANION_AMP:
+               return SDCA_FUNCTION_TYPE_COMPANION_AMP_NAME;
        case SDCA_FUNCTION_TYPE_IMP_DEF:
                return SDCA_FUNCTION_TYPE_IMP_DEF_NAME;
        default: