]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: Intel: catpt: Cleanup components_kcontrols[]
authorCezary Rojewski <cezary.rojewski@intel.com>
Wed, 3 Jun 2026 08:58:27 +0000 (10:58 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 4 Jun 2026 16:00:27 +0000 (17:00 +0100)
Fix alignment and drop redundant comments.
While at it, declare the mute-boolean explicitly.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260603085827.1964796-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/catpt/pcm.c

index faa9c483c98e17aa2268a7b0fbb8b391822bddca..8fb0efb67eb1d88ed834a58679b1a50e68f87635 100644 (file)
@@ -968,6 +968,7 @@ static int catpt_loopback_mute_put(struct snd_kcontrol *kctl, struct snd_ctl_ele
        return 1;
 }
 
+static bool catpt_loopback_mute;
 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(catpt_volume_tlv, -9000, 300, 1);
 
 #define CATPT_VOLUME_CTL(kname, pname) {               \
@@ -984,14 +985,12 @@ static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(catpt_volume_tlv, -9000, 300, 1);
 }
 
 static const struct snd_kcontrol_new component_kcontrols[] = {
-/* Master volume (mixer stream) */
-CATPT_VOLUME_CTL("Master Playback Volume", MIXER),
-/* Individual volume controls for offload and capture */
-CATPT_VOLUME_CTL("Media0 Playback Volume", OFFLOAD1),
-CATPT_VOLUME_CTL("Media1 Playback Volume", OFFLOAD2),
-CATPT_VOLUME_CTL("Mic Capture Volume", CAPTURE1),
-SOC_SINGLE_BOOL_EXT("Loopback Mute", (unsigned long)&(bool[1]) {0},
-                   catpt_loopback_mute_get, catpt_loopback_mute_put),
+       CATPT_VOLUME_CTL("Master Playback Volume", MIXER),
+       CATPT_VOLUME_CTL("Media0 Playback Volume", OFFLOAD1),
+       CATPT_VOLUME_CTL("Media1 Playback Volume", OFFLOAD2),
+       CATPT_VOLUME_CTL("Mic Capture Volume", CAPTURE1),
+       SOC_SINGLE_BOOL_EXT("Loopback Mute", (unsigned long)&catpt_loopback_mute,
+                           catpt_loopback_mute_get, catpt_loopback_mute_put),
 };
 
 static const struct snd_soc_dapm_widget component_widgets[] = {