From patchwork Sat Nov 24 11:09:45 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: 10696505 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 84E2314BD for ; Sat, 24 Nov 2018 11:47:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71BA12AB11 for ; Sat, 24 Nov 2018 11:47:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62AA82AB32; Sat, 24 Nov 2018 11:47:42 +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 EC6E02AB15 for ; Sat, 24 Nov 2018 11:47:40 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B919C267A7D; Sat, 24 Nov 2018 12:10:07 +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 0B806267A7F; Sat, 24 Nov 2018 12:10:06 +0100 (CET) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by alsa0.perex.cz (Postfix) with ESMTP id 7A5FB26786E for ; Sat, 24 Nov 2018 12:10:03 +0100 (CET) Received: by mail-pg1-f194.google.com with SMTP id 70so4052462pgh.8 for ; Sat, 24 Nov 2018 03:10:03 -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=U5KrbeDOayGafnMfZXHDTR3LraAngU/khaaLGQjGG+XqRtz9DveBKxB+XPxxNm9VR3 i5iRRVls3kacbYHg5DVKSkzrZczpdjzvRX7sVMsL9RBQxNHsiTy27dqctMXPIH3tD16P n9oktsOcJgfAuRgvhgXYLuRcjWeYUWGX6BY3M= 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=sS1K56HglyEow13PH3TCo+z7mL98ivKC87tkJajkTz+Be+1Y+qW/CF/ZFmwkNSmMI+ GDnBWMhNH+rz5lCtv4bSKhayrqa8XNSQo7+uk7AwrC+pGomF6eeUlY7PSdwRhE53V6xH mIjx9apfh+QHURODoalnhG5Pz6f/42nHaWeYx1wW1/xVIK14bP3535JOjgDIfXyFwq71 COpngCcSORkBsOh6JKrhEtGL4KZfJdfuhr+zDKeclJmAVrShwpMPxY96nstmRecICt4Y tVJAIMdaD2GBBHO8xehCX/nOfLeWpWpIiBA2us+GEgntsRWlvo+1df84Lv6Q/Py8xmr0 YObQ== X-Gm-Message-State: AA+aEWYHj/7FAFgVVc3dEVamK+Pijq509EKIClV4ATQMBuuvfTRvl95i dWWqRsC4r7bskjt0/mU9hv3E2w== X-Google-Smtp-Source: AFSGD/UXLFP+4DfOkj/HXVi9bk2s07ptBhhw4EXV5ZjjjP3YnudAyj4pVUKVHaXdLZlj19y3rW5i0Q== X-Received: by 2002:a63:2744:: with SMTP id n65mr17384088pgn.65.1543057802205; Sat, 24 Nov 2018 03:10:02 -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 v124-v6sm25098580pfb.182.2018.11.24.03.09.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Nov 2018 03:10:01 -0800 (PST) From: Cheng-Yi Chiang To: linux-kernel@vger.kernel.org Date: Sat, 24 Nov 2018 19:09:45 +0800 Message-Id: <20181124110948.209019-1-cychiang@chromium.org> X-Mailer: git-send-email 2.20.0.rc0.387.gc7a69e6b6c-goog MIME-Version: 1.0 Cc: oder_chiou@realtek.com, alsa-devel@alsa-project.org, tzungbi@chromium.org, Mark Brown , Rohit kumar , dgreid@chromium.org, Cheng-Yi Chiang Subject: [alsa-devel] [PATCH 1/4] 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 Acked-by: Srinivas Kandagatla --- 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);