ASoC: Intel: avs: 16 channels support
authorMark Brown <broonie@kernel.org>
Tue, 8 Apr 2025 09:25:08 +0000 (10:25 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 8 Apr 2025 09:25:08 +0000 (10:25 +0100)
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>:

Relatively small delta-wise patchset which raises max channels supported
from 8 to 16.  The existing limitation is software-based, not hardware
based.  The hardware, as per HDAudio specification, section 1.2.2,
(relevant register at SDnFMT, section 3.3.41) supports the
configurations for years.  The avs-driver becomes the first consumer of
that configuration on the Linux kernel side.

Set starts off with update to string_helpers so that functionality added
with parse_int_array_user() can be utilized in kernel-kernel
interactions.

Follow up is rasing the cap on HDAudio-library side.  The format
selection procedure found in the library is good-to-go as is.

Everything that follows these two patches is avs-driver specific:
- raise channels_max for every DAI-driver template
- provide i2s_test module parameter for testing purposes.  When combined
  with I2S loopback card, allows to test 16ch on most Intel hardware post
  Broadwell era
- adjust TDM masks to reflect the 8 -> 16 channels change

1  2 
sound/soc/intel/avs/board_selection.c
sound/soc/intel/avs/messages.h
sound/soc/intel/avs/path.c
sound/soc/intel/avs/pcm.c

index 251269b5708d3f51020af0eb13e7991e41f2cc97,286d94df5f463cdf0007370f6bc30e05b25c829e..6f6137c3a02c8bbe3d613ad864ff0f7e17f29923
  #include "avs.h"
  #include "utils.h"
  
- static bool i2s_test;
- module_param(i2s_test, bool, 0444);
- MODULE_PARM_DESC(i2s_test, "Probe I2S test-board and skip all other I2S boards");
+ static char *i2s_test;
+ module_param(i2s_test, charp, 0444);
+ MODULE_PARM_DESC(i2s_test, "Use I2S test-board instead of ACPI, i2s_test=ssp0tdm,ssp1tdm,... 0 to ignore port");
  
 +bool obsolete_card_names = IS_ENABLED(CONFIG_SND_SOC_INTEL_AVS_CARDNAME_OBSOLETE);
 +module_param_named(obsolete_card_names, obsolete_card_names, bool, 0444);
 +MODULE_PARM_DESC(obsolete_card_names, "Use obsolete card names 0=no, 1=yes");
 +
  static const struct dmi_system_id kbl_dmi_table[] = {
        {
                .matches = {
Simple merge
Simple merge
index cb32377d922d44a056e39114ba7628c1d63364e2,9dd5215b2c72186438fe0345daa667f86baf7441..af4e6fbadb012cdff12986afdf2718356ec58c7e
@@@ -1396,9 -1334,10 +1396,9 @@@ int avs_dmic_platform_register(struct a
  }
  
  static const struct snd_soc_dai_driver i2s_dai_template = {
 -      .ops = &avs_dai_nonhda_be_ops,
        .playback = {
                .channels_min   = 1,
-               .channels_max   = 8,
+               .channels_max   = AVS_CHANNELS_MAX,
                .rates          = SNDRV_PCM_RATE_8000_192000 |
                                  SNDRV_PCM_RATE_12000 |
                                  SNDRV_PCM_RATE_24000 |