Received: by 2002:ac2:4c32:0:0:0:0:0 with SMTP id u18csp21307lfq; Wed, 20 Apr 2022 14:23:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw94Dq0OUCDhJzqtoSOwo0z61/7bfHGGbOXP6oa+DsMwijj3lrR3WXD+FI25FwBtXHZ3a8K X-Received: by 2002:a63:e355:0:b0:39d:7956:6d3c with SMTP id o21-20020a63e355000000b0039d79566d3cmr21151389pgj.385.1650489813988; Wed, 20 Apr 2022 14:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650489813; cv=none; d=google.com; s=arc-20160816; b=XURB5IQoCmfeBEDYgNRes7nldBNmGZomSKZNJFmqND6pFAEI2U1Q/Ob0DcmagPyBZl P8qF/9aZ+v8fsHNiZaOq3uXIiHbxKISq/c1JClzwnaGpDIu/o8tHrC5EVs/wxENrHJSo l12UMSYhQi8CrLz1OOOZgN1Lsr/0G/Ft1eOGTKI+w8n9tLnsmAt98t4Tki/pWGpHbahp 5jsfdFZ5vS6KlUd0AS8qxHt6XcUWEJflutCU/Ex5eH2fpYwqNV3h/+gzMfiLLWO1otli jBH8sehQ62mvyP9Uv5HCGcG+NpVXrv29cKhZMjMHOzAGHYlBCK77HYILnvbDxGw0btLT 3Q9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=AfuD0adMHdVdGBphmISzdkHuokPa7yMy38/SGYT3mOg=; b=J7oWJfA0LBizTAS7O3/exfURMK/sK2s1M51t6s/jeNJSlgtC6VZdZvINbJIvn5xJL7 L+Ruz56/m2uogl73Sf3HzRwlNX8o8AOnO+MyAtDmG8jK6+JfYdzuprthqnZ+MigxnWl/ Cec14yqqUd7gkRW3dF7opQxProeLOiGw/xmDPtTsIwlsW6AZnu/qrCfoPJS3lLUIficI cb3OEsQx9NDl7DtHn3SxN3munUMnDVlislQet6EsnF6SU3X4k8FdFawI+60k37PJL79I wSFISQBPAg08Xckuc2gyvIMmZVeDLvNu47NOgMsCt0oNf+4/16fQJv1E0LRqym2W5nve GCUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ItWrtcCo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u14-20020a17090ae00e00b001ca9946de5dsi2880695pjy.56.2022.04.20.14.22.58; Wed, 20 Apr 2022 14:23:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ItWrtcCo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348081AbiDSJWk (ORCPT + 99 others); Tue, 19 Apr 2022 05:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349554AbiDSJWc (ORCPT ); Tue, 19 Apr 2022 05:22:32 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25429114E for ; Tue, 19 Apr 2022 02:19:49 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id r4-20020a05600c35c400b0039295dc1fc3so1055545wmq.3 for ; Tue, 19 Apr 2022 02:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=AfuD0adMHdVdGBphmISzdkHuokPa7yMy38/SGYT3mOg=; b=ItWrtcCoxUOYpMXnC+OMSnDOHEWg2fruvwm9KfP91sOMKDuseMDDfBTUC0h3GVseB6 iFJbjKWOOYqLwUo6oIEImV2ToiTAaaB1xls+faQO1R7dMgEsgM5KqfHfUNILYaaq7H1s g/ri7FmiNrxRVwU2V0n0NWW/q5w+i4Uvun5tdabAa4kTCDI4PRch90yE21P4RGmoT0Ki uLTwkVlM3+KvuWrqXMQqBIgf2pROKy4OrmCyjF+g4YaNqq+ursjTUA+S8IAolrkR0AJU D2CT3YBjgnwoJDQaKVRLFf1ChF35VA5Iz35V/ZQpbfVWw/NUAngBf03VTCsvYthgJ8Qb 3SYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=AfuD0adMHdVdGBphmISzdkHuokPa7yMy38/SGYT3mOg=; b=CRx1TOixK0il/ik9BkPNnieditQwpoOmy4i79whaKN17wsdcsv76Nn4zO7cb04dSa8 YGIR7ZzQ474ypxNVzHHj/GV/JCYe4OiQOMf0/BdWJ/ljGWK79tjUAzc/KOpcSmlxrlZr jdGHu3DPsq55Jw1+XlHzjAsZ/JWKH+5PlK3h0BMjm/7Yvks4Im31BOufBwT5oFvs5qk1 kl85KsWWpCSrjvebwHxZeYXbYEtL/vZrFDy55eIFP4DbxFNM4SjCLPJAojq/1OjHbWWm ZOUsHkPG6DKdXBci2tFNm+7ZnHJbRfR9sQvv76rPXE+oY1NBFIJrCK3SGejgABH74i+8 KAdg== X-Gm-Message-State: AOAM531XtM50fnfxUfipT2Rozb5kWOxZO/o1a62zm0x5H9HzRX7kPKCe 390eZx5BuwNnMnMpROSsxLd2+g== X-Received: by 2002:a7b:c844:0:b0:38e:7c92:a9e3 with SMTP id c4-20020a7bc844000000b0038e7c92a9e3mr14569718wml.140.1650359987755; Tue, 19 Apr 2022 02:19:47 -0700 (PDT) Received: from [192.168.86.34] (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.googlemail.com with ESMTPSA id o13-20020a05600c4fcd00b00392951086efsm6400282wmq.34.2022.04.19.02.19.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Apr 2022 02:19:47 -0700 (PDT) Message-ID: <102ad140-dc26-d266-a716-4e22003ec601@linaro.org> Date: Tue, 19 Apr 2022 10:19:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] ASoC: qcom: SC7280: Update machine driver startup, shutdown callbacks Content-Language: en-US To: Srinivasa Rao Mandadapu , agross@kernel.org, bjorn.andersson@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, quic_plai@quicinc.com, bgoswami@quicinc.com, perex@perex.cz, tiwai@suse.com, quic_rohkumar@quicinc.com, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, swboyd@chromium.org, judyhsiao@chromium.org Cc: Venkata Prasad Potturu References: <1650352619-17370-1-git-send-email-quic_srivasam@quicinc.com> From: Srinivas Kandagatla In-Reply-To: <1650352619-17370-1-git-send-email-quic_srivasam@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/04/2022 08:16, Srinivasa Rao Mandadapu wrote: > Update machine driver startup, shutdown callback functions to support > codec DMA paths. Without this change, platforms with WCD codec is failing > to register sound card. > > Signed-off-by: Srinivasa Rao Mandadapu > Co-developed-by: Venkata Prasad Potturu > Signed-off-by: Venkata Prasad Potturu > --- > sound/soc/qcom/sc7280.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/sound/soc/qcom/sc7280.c b/sound/soc/qcom/sc7280.c > index 4ef4034..d64df11 100644 > --- a/sound/soc/qcom/sc7280.c > +++ b/sound/soc/qcom/sc7280.c > @@ -295,6 +295,10 @@ static void sc7280_snd_shutdown(struct snd_pcm_substream *substream) > break; > case LPASS_DP_RX: > break; > + case LPASS_CDC_DMA_RX0 ... LPASS_CDC_DMA_RX9: > + case LPASS_CDC_DMA_TX0 ... LPASS_CDC_DMA_TX8: > + case LPASS_CDC_DMA_VA_TX0 ... LPASS_CDC_DMA_VA_TX8: > + break; > default: > dev_err(rtd->dev, "%s: invalid dai id 0x%x\n", __func__, > cpu_dai->id); Why not just make sc7280_snd_startup code like this: static int sc7280_snd_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); int ret = 0; switch (cpu_dai->id) { case MI2S_PRIMARY: ret = sc7280_rt5682_init(rtd); break; default: break; } return ret; } and sc7280_snd_shutdown with something similar --srini > @@ -316,6 +320,10 @@ static int sc7280_snd_startup(struct snd_pcm_substream *substream) > break; > case LPASS_DP_RX: > break; > + case LPASS_CDC_DMA_RX0 ... LPASS_CDC_DMA_RX9: > + case LPASS_CDC_DMA_TX0 ... LPASS_CDC_DMA_TX8: > + case LPASS_CDC_DMA_VA_TX0 ... LPASS_CDC_DMA_VA_TX8: > + break; > default: > dev_err(rtd->dev, "%s: invalid dai id 0x%x\n", __func__, > cpu_dai->id);