From patchwork Wed May 8 08:16:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 795524 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1288C19F4F for ; Wed, 8 May 2024 08:17:59 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id ECAD9E7F; Wed, 8 May 2024 10:17:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ECAD9E7F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1715156278; bh=d+whTvaCUFBkWJxrgaqvE8kSJoAykKqRo1KOv90DlbU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UxdPOv+YNZ752v1gAlpSRviPRHfBwadyd2IgYqWbkkkH/yeXGi0tqASDxfskKU03X x77BVP+iiI7355c2klyh2Aqg4+KPSnIzKOLK7E/ajBsMaxbdg9ih/ugh+cw3fgZQ8K GjnpAJP8Qf2LocqMWHMeVVG8OQi0tggO1UkXItIQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1ED56F805E8; Wed, 8 May 2024 10:17:02 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3137BF805E3; Wed, 8 May 2024 10:17:02 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4C68BF805B1; Wed, 8 May 2024 10:16:58 +0200 (CEST) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 79CD0F80423 for ; Wed, 8 May 2024 10:16:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 79CD0F80423 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=QwaSF3U1 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a59a64db066so1035012666b.3 for ; Wed, 08 May 2024 01:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715156201; x=1715761001; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0J7Cge03mHzKytqfe46M5SWmiJDYT6L/0iD5WUZ2XNk=; b=QwaSF3U1UYijSP+FCnIEtzgp0Rrsk7/MzikG13ACbpYkX2zRxZGCCGoR5sNV//kZhI cIU3FISOj2P4GSKpyROqxX2Ra7E+TR+HTBgw/VSUQIpYElieD520X4oEmx43cftfWndQ hJd03RlgKlDSojXe6Yb/yzrbdv1VKqfBplkQ4lzfVnpUKFcZTtDkqAVoRFQrhRU1VLPD ufnD0ffr96Aa4lMwmUYHL4E4OZVKYP3MM0q01Mki7RyejbViMQot4pFpTTDerz1lzhF0 09/egakBx+GOiAYgpzg88/SDb8U36T+8I9U8ez9P+fgSXujfK2ShUCpNOBIsqgcjQfAW DyYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715156201; x=1715761001; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0J7Cge03mHzKytqfe46M5SWmiJDYT6L/0iD5WUZ2XNk=; b=UgQ795aofZw5SM09KFO8KSF1hKVROjGmVwXXGImaZWsKpY6yVRSBPjAu31iHVIlIDl LdhrcmIr/XwmfMmuV4WipSIsYf5DNGVpASI3Z7MWd/pXgXk/6V7A8/gCdCCzu6So5Npw E9eyFIftKAHNOZJ/WfsxmVVYsgW/ZtU/f/R5lVn7X8t5qIbWRTm+lrFJKyuBVjUV7Jn+ 5vR/SgknIMj2zw0utpb36b6/adL0MCU6kDJJtCm8Vtu7STaa8ic7BtBWzbPR3R5kjWlk kgM1voG18a8atFJiQFwF5syIQDibjML1+kthNqNHXLY/bYqBEfJ8FlzH2U4rn9MrMebW qcHw== X-Gm-Message-State: AOJu0Yw6+fS0gjavgIZ2u4qIhuebOQ2G5EbJUL1Tc21WUvl9cL5R5+7z L2d7IdKoD/KJjcbnG1/wgFMBufhKnaPC1wO8kY7vYb65+09MvpY9UKeO8/tpBt0= X-Google-Smtp-Source: AGHT+IFZ3qYEvnZ6rTmw8oYG9ikVNB5PUPg8nEX7L1tXb4l7wu50K2eH4wdfLFOOD0rRGkPUkUdGPw== X-Received: by 2002:a17:906:4a01:b0:a59:afdd:5911 with SMTP id a640c23a62f3a-a59fb9cf8ebmr117229466b.61.1715156201334; Wed, 08 May 2024 01:16:41 -0700 (PDT) Received: from [127.0.1.1] ([178.197.206.169]) by smtp.gmail.com with ESMTPSA id va28-20020a17090711dc00b00a59b87dd0d7sm4564734ejb.147.2024.05.08.01.16.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:16:40 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 08 May 2024 10:16:28 +0200 Subject: [PATCH v2 2/4] ASoC: qcom: q6apm-lpass-dais: Implement proper channel mapping MIME-Version: 1.0 Message-Id: <20240508-asoc-x1e80100-4-channel-mapping-v2-2-ccef9a66a572@linaro.org> References: <20240508-asoc-x1e80100-4-channel-mapping-v2-0-ccef9a66a572@linaro.org> In-Reply-To: <20240508-asoc-x1e80100-4-channel-mapping-v2-0-ccef9a66a572@linaro.org> To: James Schulman , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2494; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=d+whTvaCUFBkWJxrgaqvE8kSJoAykKqRo1KOv90DlbU=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmOzTi8NEsdlADISPfQf36sKPevu5VsjGLqs0hx kDZ6uc8tH+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjs04gAKCRDBN2bmhouD 11aOD/9s1WsoAA6B5DobpnjGcCX7UuSSk/NL0D87AYUsJWiNfkbfnVALM79q2oh77xiICczVoTc F+UQ2l/Z7dybuXatUoPdSrs0jzy3aAhh4Cq85245TWhfmAVzAEwKGLUAXYGMNiWSkGhr8PF0AMl w0XyISwuUL5jS9yjcycHy2Y8xd2GWrJN5BjrEOz85WR8W+lWoietfVaE+HeFcwXXDNcXgSkSuae ndEbcKiJ01RB4rqL1ka/dn8Dvz6/S+ddEU2NlPUttdvaLsWK+MEYg+4v7VlJvm3VBlh5Uy4pmuW 3rNPNsQ6iqIH4UQ+JCiLd5Z5gTNLSAsZ9gAslAd/2AlLmYr6VeohJvMCWU3jGYjndWs3ypoHGf4 h5mnWpYgylDE94yfPG8kSiEuWRKFrKEmfGLLMzKr1NP6dR1d6pHQXZvZcV8Ge4NQkmPmHtT7sOs bMSPaJN1T0S3K0xwx/dDOFE/Tm+n5oxBYX6HyfHkgXMoF3RO0679nax4RQyea+7a6f13hrBXQEW D4cc2QND4Omhz3v7sq5pYnhMTAN3CujXiL9/dYigdLg0RXCScmuTZFtpWMWZBFHGPBbiPJsp529 BrdEQZBQHuNK38RvxE8pY72CYAJbZrUKUiXPj29rASjjCprRepydfG/Vlp60j7OnImnt+p7zFCG d85DyJDwvsMneqQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: TP35V7VUAGTHHJGJVYIQJ4T4OF77GXSO X-Message-ID-Hash: TP35V7VUAGTHHJGJVYIQJ4T4OF77GXSO X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The set_channel_map() implementation in q6apm-lpass-dais driver was copying older pre-Audioreach code from q6afe-dai driver, but not really using it. The code sets active channel mask based on passed channel mapping, but Audioreach code does not use that mask ever. Audioreach module configuration does have on the other hand proper channel mapping field, which should supersed that active channel mask. Drop the unused active channel mask and implement proper mapping of channels in q6apm-lpass-dais driver. Signed-off-by: Krzysztof Kozlowski --- Changes in v2: 1. Entirely replaced - now channel mapping is implemented in q6apm-lpass-dais. --- sound/soc/qcom/qdsp6/audioreach.h | 1 - sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h index 2c82917b7162..eb9306280988 100644 --- a/sound/soc/qcom/qdsp6/audioreach.h +++ b/sound/soc/qcom/qdsp6/audioreach.h @@ -755,7 +755,6 @@ struct audioreach_module_config { u16 data_format; u16 num_channels; - u16 active_channels_mask; u16 dp_idx; u32 channel_allocation; u32 sd_line_mask; diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c index 6bfbb52345e1..a4ad1d0e6abd 100644 --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c @@ -33,7 +33,7 @@ static int q6dma_set_channel_map(struct snd_soc_dai *dai, struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev); struct audioreach_module_config *cfg = &dai_data->module_config[dai->id]; - int ch_mask; + int i; switch (dai->id) { case WSA_CODEC_DMA_TX_0: @@ -58,7 +58,8 @@ static int q6dma_set_channel_map(struct snd_soc_dai *dai, tx_num); return -EINVAL; } - ch_mask = *tx_ch_mask; + for (i = 0; i < tx_num; i++) + cfg->channel_map[i] = tx_ch_mask[i]; break; case WSA_CODEC_DMA_RX_0: @@ -81,7 +82,8 @@ static int q6dma_set_channel_map(struct snd_soc_dai *dai, rx_num); return -EINVAL; } - ch_mask = *rx_ch_mask; + for (i = 0; i < rx_num; i++) + cfg->channel_map[i] = rx_ch_mask[i]; break; default: @@ -90,8 +92,6 @@ static int q6dma_set_channel_map(struct snd_soc_dai *dai, return -EINVAL; } - cfg->active_channels_mask = ch_mask; - return 0; } From patchwork Wed May 8 08:16:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 795523 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71573C04FFE for ; Wed, 8 May 2024 08:19:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5E88AB6A; Wed, 8 May 2024 10:18:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5E88AB6A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1715156339; bh=RVNDo+PUPNeV1sa0OC/s/rwZqNAdhw3yPx+40/ruZ0I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QSDH79R1RWd7q9RgGKDUHLu6n+5f3y7xOzqeXRTHqFoAQHrIJy0nKbjLglQCcnZyL Gx+5WkSWKQQSduvQ3lh6t0r+LuPgxWXPfBLGT07bGU6PZs2aNeepJRzVkvbh14taUk Q1y5x4UiqgjGQWbXG5o/efKf/VcIvHFBzVPGQRBc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9D856F805C7; Wed, 8 May 2024 10:18:18 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0570DF805D6; Wed, 8 May 2024 10:18:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A73F6F80579; Wed, 8 May 2024 10:18:13 +0200 (CEST) Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5547AF804E7 for ; Wed, 8 May 2024 10:16:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5547AF804E7 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=gAz2NRI/ Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a59ab4f60a6so877662166b.0 for ; Wed, 08 May 2024 01:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715156204; x=1715761004; darn=alsa-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=sm/iyvA/oRf8IDDwCG6199y51shfGYvzaBKbXuvmT5Q=; b=gAz2NRI/haef/eILVdyC/1a7y35XepEmxso/2/jfEZiXAdkUJcfsvsQc1u2yJFQfIq 7Iz5E/zc4BVAVhCf48qPDDyta4H5QE0JbM4og+/uNIhxFNsI+xnzyRtkrIyBZa9YIUfx RQpxiFo7l3xUXiO2weY1uqWqEuGSczilsu7ENAsvhjw3Q5tWhRocMPL+1Ruzvrs7iJVC 3/k8WRhcoA7WF2cvULAD+SrmsAG/yd+TRW7VTX1r6VluY9lSxXOCXbVOOCUPqiNcPcBC n2/U09JHhWO7II0spmH5p5LoUOk7bALEcQnYDdmUszulXX/vnuYf8pSjlhuVNxLsBfTp kgkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715156204; x=1715761004; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sm/iyvA/oRf8IDDwCG6199y51shfGYvzaBKbXuvmT5Q=; b=IewgVJpXfDIdwkdvWV5nXy/ssrYqiJWlyNcI5GwTQN9xrnMhEY6PjUGJGxhH1sFnfM lHw+/P5mdRe1TNvmXjyi6dv92kCHdKETO/7Y4ZdDhDQlbjUCoeLchQ8eb/miTEpN11cJ nua2B7UB0k2uWstCB8auNBd86drXQU0qs4rI4DSGREBwZPTFTlO0nILRG11OpWTAnVPG 55DUleWSQUgKrtuI9bHCeDaSsH6eWEio25onW51cQ9+IFbzPQyMszZlIjdo+QQaHNKNC LQP5KKYFxHM5Ac7pUQDf4Z4v34sgEIrTiNI6tzKoPDfPkMVu8A/CzN08oAsaKOCX+GRw 2RGA== X-Gm-Message-State: AOJu0YwcINmtuTmV+K3haiNeZyQqgHbXwWHNldtoYyEy9HcpJBpvsY9W sbcdTGbA8TyGq2fLmBLybkqzWrtFwgrXq4J6OKieJZzcCG09XEj7EQzv5bgerj4= X-Google-Smtp-Source: AGHT+IEcO03sXS25ca8HNMd80x92ztrXnHCfFufNC3oFOema6hx6ZWP/GUScP9uFCp2eEtc5nFXxgw== X-Received: by 2002:a17:906:c2d9:b0:a59:c23d:85ce with SMTP id a640c23a62f3a-a59fb9c6b24mr143408066b.51.1715156204516; Wed, 08 May 2024 01:16:44 -0700 (PDT) Received: from [127.0.1.1] ([178.197.206.169]) by smtp.gmail.com with ESMTPSA id va28-20020a17090711dc00b00a59b87dd0d7sm4564734ejb.147.2024.05.08.01.16.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:16:44 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 08 May 2024 10:16:30 +0200 Subject: [PATCH v2 4/4] ASoC: qcom: x1e80100: Correct channel mapping MIME-Version: 1.0 Message-Id: <20240508-asoc-x1e80100-4-channel-mapping-v2-4-ccef9a66a572@linaro.org> References: <20240508-asoc-x1e80100-4-channel-mapping-v2-0-ccef9a66a572@linaro.org> In-Reply-To: <20240508-asoc-x1e80100-4-channel-mapping-v2-0-ccef9a66a572@linaro.org> To: James Schulman , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1580; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=RVNDo+PUPNeV1sa0OC/s/rwZqNAdhw3yPx+40/ruZ0I=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmOzTkOvfRHwYugcz1kWoAcP3RrYYVLFgYomUkd wIXaQGCsqWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZjs05AAKCRDBN2bmhouD 17MfD/9ppYgawBoat2rd8pJ2G9oUl2iFD/zoJ64d4jFm5+wgcwXzMQiTRfSf7oFG8U+a9tEP9Lz KIEJluX00tJicgT3dxM0fC1NxHgTQKdyRhCTgsyoYlIdMsM5ffGkaPXZpKUnbZLpvoKC5TS9l45 XuZnc1CaiutElSV2WeOBZN055cBzSup7HUYMjrpjYw1ZjJodQmROFvIp6DC8ck09Eaivs1Faz4A pRgweZoMHmEmVlESPoHB574JtwtKaYnL3naL9Q9PxmReTPmIyHYXlQvao76rKgdsVaHcjuveRWM Se7RGCOp0csNhKv9bvu/U9+OUUUizlnwE1OktST9U9nZxrmM0kTURDj6kz7+84uVwf/dN3AUiq/ akm0Zt99Wo5Jc3m2WwBRizlSMx7SIx6tM8tjNL6NDW296+M4Z4wlKD5o/Vm509RE5V/LSula/Qa G1OvZI53EqPpwlgGtESAYdfmmQl4pnz+mAIbhyevVgEjrpgLmVfUaPb6g9jc45jR8XBkkH+hs8A Pjg++CEL6W05MMiNzBediwzt5EYd8dvKeQB1Bj2P/Y3kfuPKUnW2tJ8b2bevnmE4DJwlHzyCVDT 8sxPzgstpttuV5NNVaJjbbnJr1HFnS3lhLY61Y6JW/kmIRUoEj59SdrGb/tqhXXsz7lQPgYiRhl /HjRVehRnvlOnwg== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Message-ID-Hash: HFAZB7GAUMSVN4N5ALFT2K4AKQZNLQMX X-Message-ID-Hash: HFAZB7GAUMSVN4N5ALFT2K4AKQZNLQMX X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X1E80100 CRD board comes with four speakers arranged as left front+back and then right front+back. Using default channel mapping causes front right speaker to play left back stream. Signed-off-by: Krzysztof Kozlowski --- Changes in v2: 1. Rework significantly, because only backend DAIs is now affected. --- sound/soc/qcom/x1e80100.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sound/soc/qcom/x1e80100.c b/sound/soc/qcom/x1e80100.c index c3c8bf7ffb5b..27f34c0873ab 100644 --- a/sound/soc/qcom/x1e80100.c +++ b/sound/soc/qcom/x1e80100.c @@ -12,6 +12,7 @@ #include "common.h" #include "qdsp6/q6afe.h" +#include "qdsp6/q6dsp-common.h" #include "sdw.h" struct x1e80100_snd_data { @@ -80,6 +81,23 @@ static int x1e80100_snd_prepare(struct snd_pcm_substream *substream) struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; + const unsigned int rx_slot[4] = { PCM_CHANNEL_FL, + PCM_CHANNEL_LB, + PCM_CHANNEL_FR, + PCM_CHANNEL_RB }; + int ret; + + switch (cpu_dai->id) { + case WSA_CODEC_DMA_RX_0: + case WSA_CODEC_DMA_RX_1: + ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL, + ARRAY_SIZE(rx_slot), rx_slot); + if (ret) + return ret; + break; + default: + break; + } return qcom_snd_sdw_prepare(substream, sruntime, &data->stream_prepared[cpu_dai->id]);