From patchwork Wed Nov 28 09:00:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-yi Chiang X-Patchwork-Id: 10702089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F23315A8 for ; Wed, 28 Nov 2018 09:00:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EAB22CE04 for ; Wed, 28 Nov 2018 09:00:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19CF12CE33; Wed, 28 Nov 2018 09:00:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CD952CE04 for ; Wed, 28 Nov 2018 09:00:57 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CAD18267AF4; Wed, 28 Nov 2018 10:00:55 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7FDA4267B01; Wed, 28 Nov 2018 10:00:53 +0100 (CET) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by alsa0.perex.cz (Postfix) with ESMTP id 1F2C5267AF3 for ; Wed, 28 Nov 2018 10:00:49 +0100 (CET) Received: by mail-pl1-f194.google.com with SMTP id gn14so17079891plb.10 for ; Wed, 28 Nov 2018 01:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IUOy4aZ8sMVe6+qMyVL/vM/qr2CuqdP0B3o/v6hxFfA=; b=bdfFdrKDZrKggQ4uqk3ZzKRghc+LFCQdp1DM6NVZyUt1YwGaQLdz4WDYMdXkpfRo28 tI4mFgimoUggJKQI2Qj6KG9E8sJWDwXTs9A3LE5D6s/Dj3KqKViAuJBzRo0pMXFERH8V zo0T6fh2KGVVjMo7avspGBQkuAqDg1HkpkIrY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IUOy4aZ8sMVe6+qMyVL/vM/qr2CuqdP0B3o/v6hxFfA=; b=k3TlBuZzHHRvZ5hsNgLbKC9OdMGBDKPzBDid+9XOF3hnSBVbkReJDEyS7aBRutB6ru DABsbmwU7UMsEl4/KJHIsexV4st1u/jozs0SYsYhLC8JgndGh+yFYNGRWnuKOMWZp8hu rnFJN4SOWFE8woWnXwmQ0sb/caDysD/TmcZQLA4haRgXcoWtdBuMB2AmJXxLy77arzsv pXmLtQvHGLTnAVJg37PDVergc9q2598mTlijQfZ4SSmucK4hs4qII9ndkAaGNulqRjpP 39hzb2jBvN8wLPNNNGET76wwzL/91IbOD+9KtFvy4Z7dUskevx4mJJmtuvc2ZyVwRLgl gQXw== X-Gm-Message-State: AA+aEWYKtd5BGOdIccvhtXlmvNxqY6St4hV4pj6H8KdDNuBjpYdXm+TN hecWaNniMZ5FjeRVyb0RzIS+Lw== X-Google-Smtp-Source: AFSGD/UlB7/+iwCyKUvjBqbaX6i2qOGc6R4dywm+eackpd9WbXVEwBwDBklbe7jgd11Yz8FA0oAInw== X-Received: by 2002:a17:902:20c8:: with SMTP id v8mr17457296plg.319.1543395649008; Wed, 28 Nov 2018 01:00:49 -0800 (PST) Received: from cychiang-z840.tpe.corp.google.com ([2401:fa00:1:b:e688:dfd2:a1a7:2956]) by smtp.gmail.com with ESMTPSA id i72sm11568607pfe.181.2018.11.28.01.00.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Nov 2018 01:00:47 -0800 (PST) From: Cheng-Yi Chiang To: linux-kernel@vger.kernel.org Date: Wed, 28 Nov 2018 17:00:33 +0800 Message-Id: <20181128090037.257359-1-cychiang@chromium.org> X-Mailer: git-send-email 2.20.0.rc0.387.gc7a69e6b6c-goog MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, tzungbi@chromium.org, Mark Brown , Rohit kumar , dgreid@chromium.org, Cheng-Yi Chiang Subject: [alsa-devel] [PATCH v2 1/5] ASoC: qcom: sdm845: Add board specific dapm widgets X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Add board specific dapm widgets so these widgets can be used in the route. Signed-off-by: Rohit kumar Signed-off-by: Cheng-Yi Chiang --- sound/soc/qcom/sdm845.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 58593db2ab151..95d8d4422dae0 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -212,6 +212,14 @@ static int sdm845_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } +static const struct snd_soc_dapm_widget sdm845_snd_widgets[] = { + SND_SOC_DAPM_HP("Headphone Jack", NULL), + SND_SOC_DAPM_MIC("Headset Mic", NULL), + SND_SOC_DAPM_SPK("Left Spk", NULL), + SND_SOC_DAPM_SPK("Right Spk", NULL), + SND_SOC_DAPM_MIC("Int Mic", NULL), +}; + static void sdm845_add_be_ops(struct snd_soc_card *card) { struct snd_soc_dai_link *link; @@ -243,6 +251,8 @@ static int sdm845_snd_platform_probe(struct platform_device *pdev) goto data_alloc_fail; } + card->dapm_widgets = sdm845_snd_widgets; + card->num_dapm_widgets = ARRAY_SIZE(sdm845_snd_widgets); card->dev = dev; dev_set_drvdata(dev, card); ret = qcom_snd_parse_of(card);