Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp438831rdb; Thu, 19 Oct 2023 08:36:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlgRiGphbhiIigXnob5UzTRTgLHSZoabP8O9D9502sG5lLOjFEdg5e7xLMz/RG53dWJVHO X-Received: by 2002:a92:2804:0:b0:357:51b0:71e1 with SMTP id l4-20020a922804000000b0035751b071e1mr2734552ilf.11.1697729791735; Thu, 19 Oct 2023 08:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697729791; cv=none; d=google.com; s=arc-20160816; b=ScRqukduFgiOxf3ln2J+P6C5PM30ZN7YseXGpE3EOQf9XrVP5df8LInnUAR7dw19ZO BI+5K02dTkgvZAD7h7n//ZT5EfBtwcOEIH4SDBeqqSsMC2gW+xBm33+1vTPAQj0Dubq/ isukOgA3jiQgbosNA2bAMOcr1n614EHfB8exkSm0S59QUzNj1Am1c1ovkNxZ/iVL23mW 7oJ/8tuhGABJ+TPpSSN6HAIFfrL9pN75G0HyrtAQTt7Y1V0fh0DB5lL+7Obu2mdyvU1K Lft3+z4aA1jLHzxgPjeAyVLJ4xzi+8VIhuFYlAvZ2mKY3gOkDsgh88Kv5TOj95Z8CsPE IPQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/BSOa/ysYuWf3yTm4IHQkqxUatJT3g/WJSTaVnMkDXw=; fh=qi1UqFRqPJXRLhFMmJ5rVgYtQSWazQoJhQMR3L2Qnjk=; b=CrK7GcyM3trsIoTba6L2Av3SagGb9EINZ/Ln+RK/L8W8Xt2e5xN8LisVM2Ahe1HbFj gg9v0yraAChGvaBhKzBa2alX7KSUOonVZou5zuU/lddtr3x+XdVFyNypkAQnZNlRSR9P c3TyNN2uEH25s4UluncfTOei1SR7YuecqAB+Y9wdIzSpU/zHgyUerb2eBCHU90E+1TSx FyqEXdNalDoQ0vf7lE8VFZ1KQL9wPLk3Q3tYta3ULxNL91h0hVu10oczqRVoATxrIEVR vH5h8k3fjnuvor8stubwOfpHi0ga/EmTerTF9hE5AMHFqby6ltOfRQEkDoJSHFaMzX0D rlaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U6EaI4Jm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k5-20020a6568c5000000b00565e509dc75si4567297pgt.359.2023.10.19.08.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:36:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U6EaI4Jm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E7EC38325236; Thu, 19 Oct 2023 08:36:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346300AbjJSPgI (ORCPT + 99 others); Thu, 19 Oct 2023 11:36:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346243AbjJSPgH (ORCPT ); Thu, 19 Oct 2023 11:36:07 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44EEC131 for ; Thu, 19 Oct 2023 08:36:03 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-53db1fbee70so13618773a12.2 for ; Thu, 19 Oct 2023 08:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697729761; x=1698334561; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/BSOa/ysYuWf3yTm4IHQkqxUatJT3g/WJSTaVnMkDXw=; b=U6EaI4JmXBa6T8cRii5JOaLUIAl78xFi3E5IZlfWacACugJkoUtXQNvTyuHJ8Ke/J8 vN+kZ39FchhE4FKqwQmm0aqumVagbj2jhbyetY5J7l/1HasyzsUo6zzNL6cN2bQgj2AG pDNJ2faAJ5wNU9A13gBxh62wRP7PXuazKgqKmXdOheksOKLoM23y5zWORSgaBzXKURn3 LwQMaPHb048QWk2d5UkmBuW8wj228YTpzQDKNSnpAbZQp//YGpPuteuExshRq5C2ziok BSVJQJ7s8kMpac6fW44Rra9SV6Yfkkm/pZ+gsMDTbAp8NT8TVQJdvY72nuZZVsIZTqQe xvGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697729761; x=1698334561; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/BSOa/ysYuWf3yTm4IHQkqxUatJT3g/WJSTaVnMkDXw=; b=Xsp47zg29NOIbOKT56UZtorXQjohb2krvLfxLdMkk2Je6pmxrEfKvFufnPejWqEwn/ rxYKy5qqjL1G4Moe1SV7IOjpekEyYaga9USprb0PO+p2tcVqCsCS/c6dyL8F/hG8Jd7Z iLia9JZxiDD23ia4qR2I6Yg9xOc4OeihETDDQ05SymP4UnpXBXHSJKAu71LZeVZn+8x4 q9dBuUWHJpY2M2stHtTs3UQmnyc7443z7XPlXgyDN/Xsuzt+UqWsI1oYsTEg0IYTiGIO CQ3pYwoU2QxqG+Chh/knzieJ/4gSS4UmavMFgR9m3cr5kM2sojiPNzvQ1pgFfDPV60Wr QYww== X-Gm-Message-State: AOJu0YyHwKGK7PTi3LyAualb05guqjUbI2yxzV5gLINY1o0xTLyFHQw1 /UCCRQYoU9gTA0VEdSpmGdPYSw== X-Received: by 2002:a50:9e87:0:b0:53e:34c5:ad8e with SMTP id a7-20020a509e87000000b0053e34c5ad8emr2060982edf.19.1697729761711; Thu, 19 Oct 2023 08:36:01 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id c64-20020a509fc6000000b0053ebafe7a60sm4743875edf.59.2023.10.19.08.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:36:01 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Srinivas Kandagatla , Banajit Goswami , Jaroslav Kysela , Takashi Iwai , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] ASoC: qcom: Add support for WSA2 LPASS Date: Thu, 19 Oct 2023 17:35:41 +0200 Message-Id: <20231019153541.49753-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019153541.49753-1-krzysztof.kozlowski@linaro.org> References: <20231019153541.49753-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 19 Oct 2023 08:36:29 -0700 (PDT) Add support for Qualcomm WSA2 LPASS (Low Power Audio SubSystem) audio ports to several Qualcomm ADSP drivers: Q6APM LPASS DAIs, Q6DSP LPASS ports and shared Q6DSP Soundwire code. Signed-off-by: Krzysztof Kozlowski --- sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 5 +++++ sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c | 6 ++++++ sound/soc/qcom/sdw.c | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c index c5e065a21e27..2ae10f9dc78e 100644 --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c @@ -36,6 +36,9 @@ static int q6dma_set_channel_map(struct snd_soc_dai *dai, case WSA_CODEC_DMA_TX_0: case WSA_CODEC_DMA_TX_1: case WSA_CODEC_DMA_TX_2: + case WSA2_CODEC_DMA_TX_0: + case WSA2_CODEC_DMA_TX_1: + case WSA2_CODEC_DMA_TX_2: case VA_CODEC_DMA_TX_0: case VA_CODEC_DMA_TX_1: case VA_CODEC_DMA_TX_2: @@ -60,6 +63,8 @@ static int q6dma_set_channel_map(struct snd_soc_dai *dai, break; case WSA_CODEC_DMA_RX_0: case WSA_CODEC_DMA_RX_1: + case WSA2_CODEC_DMA_RX_0: + case WSA2_CODEC_DMA_RX_1: case RX_CODEC_DMA_RX_0: case RX_CODEC_DMA_RX_1: case RX_CODEC_DMA_RX_2: diff --git a/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c b/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c index 4919001de08b..a6502884531d 100644 --- a/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c +++ b/sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c @@ -557,6 +557,11 @@ static struct snd_soc_dai_driver q6dsp_audio_fe_dais[] = { Q6AFE_CDC_DMA_RX_DAI(WSA_CODEC_DMA_RX_1), Q6AFE_CDC_DMA_TX_DAI(WSA_CODEC_DMA_TX_1), Q6AFE_CDC_DMA_TX_DAI(WSA_CODEC_DMA_TX_2), + Q6AFE_CDC_DMA_RX_DAI(WSA2_CODEC_DMA_RX_0), + Q6AFE_CDC_DMA_TX_DAI(WSA2_CODEC_DMA_TX_0), + Q6AFE_CDC_DMA_RX_DAI(WSA2_CODEC_DMA_RX_1), + Q6AFE_CDC_DMA_TX_DAI(WSA2_CODEC_DMA_TX_1), + Q6AFE_CDC_DMA_TX_DAI(WSA2_CODEC_DMA_TX_2), Q6AFE_CDC_DMA_TX_DAI(VA_CODEC_DMA_TX_0), Q6AFE_CDC_DMA_TX_DAI(VA_CODEC_DMA_TX_1), Q6AFE_CDC_DMA_TX_DAI(VA_CODEC_DMA_TX_2), @@ -622,6 +627,7 @@ struct snd_soc_dai_driver *q6dsp_audio_ports_set_config(struct device *dev, q6dsp_audio_fe_dais[i].ops = cfg->q6tdm_ops; break; case WSA_CODEC_DMA_RX_0 ... RX_CODEC_DMA_RX_7: + case WSA2_CODEC_DMA_RX_0 ... WSA2_CODEC_DMA_TX_2: q6dsp_audio_fe_dais[i].ops = cfg->q6dma_ops; break; default: diff --git a/sound/soc/qcom/sdw.c b/sound/soc/qcom/sdw.c index 1a41419c7eb8..612865b26f88 100644 --- a/sound/soc/qcom/sdw.c +++ b/sound/soc/qcom/sdw.c @@ -21,6 +21,8 @@ int qcom_snd_sdw_prepare(struct snd_pcm_substream *substream, switch (cpu_dai->id) { case WSA_CODEC_DMA_RX_0: case WSA_CODEC_DMA_RX_1: + case WSA2_CODEC_DMA_RX_0: + case WSA2_CODEC_DMA_RX_1: case RX_CODEC_DMA_RX_0: case RX_CODEC_DMA_RX_1: case TX_CODEC_DMA_TX_0: @@ -70,6 +72,7 @@ int qcom_snd_sdw_hw_params(struct snd_pcm_substream *substream, switch (cpu_dai->id) { case WSA_CODEC_DMA_RX_0: + case WSA2_CODEC_DMA_RX_0: case RX_CODEC_DMA_RX_0: case RX_CODEC_DMA_RX_1: case TX_CODEC_DMA_TX_0: @@ -98,6 +101,8 @@ int qcom_snd_sdw_hw_free(struct snd_pcm_substream *substream, switch (cpu_dai->id) { case WSA_CODEC_DMA_RX_0: case WSA_CODEC_DMA_RX_1: + case WSA2_CODEC_DMA_RX_0: + case WSA2_CODEC_DMA_RX_1: case RX_CODEC_DMA_RX_0: case RX_CODEC_DMA_RX_1: case TX_CODEC_DMA_TX_0: -- 2.34.1