lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <sihiwhcdra2kviuago7r6gnm6b4goqcpjgt43loen5alk4atze@mhklkp2hz5y6>
Date: Wed, 22 Oct 2025 13:34:37 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Abel Vesa <abel.vesa@...aro.org>
Cc: Srinivas Kandagatla <srini@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
        Rob Herring <robh@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>, linux-sound@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 2/3] ASoC: qcom: x1e80100: Add Dell XPS13 9345 support

On Tue, Oct 21, 2025 at 04:50:45PM +0300, Abel Vesa wrote:
> On Dell XPS13 9345, the PCM channels are mapped starting with right
> hand side instead of left. So in order to support this, we need to
> hardcode the mapping and tie it up to a dedicated board compatible.
> 
> So define a match data that brings the mapping as well, for the XPS 13,
> while the rest of the boards will fallback to use the mapping based
> on number of channels.
> 
> Signed-off-by: Abel Vesa <abel.vesa@...aro.org>
> ---
>  sound/soc/qcom/x1e80100.c | 49 ++++++++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 44 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/soc/qcom/x1e80100.c b/sound/soc/qcom/x1e80100.c
> index 444f2162889f7d9d4b6b06bddc980d8a15dd988b..e21cf534b2ac3875b694f381f260164acb2e3ae4 100644
> --- a/sound/soc/qcom/x1e80100.c
> +++ b/sound/soc/qcom/x1e80100.c
> @@ -15,10 +15,17 @@
>  #include "qdsp6/q6dsp-common.h"
>  #include "sdw.h"
>  
> +struct x1e80100_snd_cfg {
> +	const char *driver_name;
> +	const unsigned int *channels_map;
> +	int channels_num;
> +};
> +
>  struct x1e80100_snd_data {
>  	bool stream_prepared[AFE_PORT_MAX];
>  	struct snd_soc_card *card;
>  	struct sdw_stream_runtime *sruntime[AFE_PORT_MAX];
> +	const struct x1e80100_snd_cfg *cfg;
>  	struct snd_soc_jack jack;
>  	struct snd_soc_jack dp_jack[8];
>  	bool jack_setup;
> @@ -95,8 +102,16 @@ static int x1e80100_snd_hw_params(struct snd_pcm_substream *substream,
>  	return qcom_snd_sdw_hw_params(substream, params, &data->sruntime[cpu_dai->id]);
>  }
>  
> -static int x1e80100_snd_hw_map_channels(unsigned int *ch_map, int num)
> +static int x1e80100_snd_hw_map_channels(struct x1e80100_snd_data *data,
> +					unsigned int *ch_map, int num)
>  {
> +	if (data->cfg->channels_map) {
> +		for (int i = 0; i < data->cfg->channels_num; i++)
> +			ch_map[i] = data->cfg->channels_map[i];
> +
> +		return 0;
> +	}

Why by default the driver remaps channels depending on the usecase, but
for XPS we use a static map?

> +
>  	switch (num) {
>  	case 1:
>  		ch_map[0] = PCM_CHANNEL_FC;

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ