[PATCH v3 11/15] ASoC: Intel: avs: Machine board registration

Guenter Roeck linux at roeck-us.net
Thu May 26 18:24:43 CEST 2022


On Mon, May 16, 2022 at 12:11:12PM +0200, Cezary Rojewski wrote:
> AVS driver operates with granular audio card division in mind.
> Super-card approach (e.g.: I2S, DMIC and HDA DAIs combined) is
> deprecated in favour of individual cards - one per each device. This
> provides necessary dynamism, especially for configurations with number
> of codecs present and makes it easier to survive auxiliary devices
> failures - one card failing to probe does not prevent others from
> succeeding.
> 
> All boards spawned by AVS are unregistered on ->remove(). This includes
> dummy codecs such as DMIC.
> 
> As all machine boards found in sound/soc/intel/boards are irreversibly
> tied to 'super-card' approach, new boards are going to be introduced.
> This temporarily increases number of boards available under /intel
> directory until skylake-driver becomes deprecated and removed.
> 
> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski at linux.intel.com>
> Signed-off-by: Cezary Rojewski <cezary.rojewski at intel.com>
> ---
[ ... ]

> +
> +static int avs_register_i2s_board(struct avs_dev *adev, struct snd_soc_acpi_mach *mach)
> +{
> +	struct platform_device *board;
> +	int num_ssps;
> +	char *name;
> +	int ret;
> +
> +	num_ssps = adev->hw_cfg.i2s_caps.ctrl_count;
> +	if (fls(mach->mach_params.i2s_link_mask) > num_ssps) {
> +		dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n",

   sound/soc/intel/avs/board_selection.c: In function 'avs_register_i2s_board':
>> sound/soc/intel/avs/board_selection.c:328:36: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'int' [-Wformat=]
     328 |                 dev_err(adev->dev, "Platform supports %d SSPs but board %s requires SSP%ld\n",
                                                                                                  ^^^

Reported by 0-day but still made it into mainline.

Guenter


More information about the Alsa-devel mailing list