Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp895316imu; Wed, 28 Nov 2018 01:03:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/VlLf4Fz5uMrZTAOb9zn/N50R3hAMo57/ZhFr87HUDcHYPPHQCB+PxzFNRKLCqAJGxTfXbh X-Received: by 2002:a63:4c04:: with SMTP id z4mr32858464pga.312.1543395784168; Wed, 28 Nov 2018 01:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543395784; cv=none; d=google.com; s=arc-20160816; b=utLt1ystR3BmArS+N1uONYQb2cKV3My2tCGSrQ4otuTGJRBQ+gSAAR11Up8NayJQUv vaYTVW1ooQ1dN4c1rr3/BXiHS/p6DTBLSJHdHLpreLeNF96e05hXFrT1RnLnqvRsJTu1 QI0ysLnHLDiZtt6Vf+Wrf6i0YV2/cpphx4U6p00IcVboklcttrvl6Kb/Hd/HDfkgOJ5W mUBORGbsQEcI5XwY3hZ2QZ3r05YG/50fyJsIpFuif8xfjHetESRcjVw0qidW7Y/D0kGN PF2c//CoqZl0rNTBUMqJsOJswOuVp379zW+ctPoyaa45YO1klExiyFVoV/Y8FOG9Lr09 P+6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=IUOy4aZ8sMVe6+qMyVL/vM/qr2CuqdP0B3o/v6hxFfA=; b=07ybqXMJhFatvSexAFiGCeO94qLrfabDSAqN2SzFvM5jQV/vrbhiEAscLPta+djIXb 2ldcHvPQYCDVDUdSnEErCiINFxQMEoRT8kXU5OJT1/oH19ZHeaTfWF2pV3OG/pxH9naU rU+0UzsdnevH3xgocqVt72McXfucBxPHwm5EHZqKHw8RVDK1jfdT5KabjbF/nVUN4Kyd 6a6ct5EWMZU2n/F0EbUZugm4+naGM8dEKgYSk90Ne6qdcoVbiq8fNDhEc7GJgACk4msW 2jECLet8lKkWNpXaU3Ao0c/OEPJ9ok2APnQ0v0iQ+mD0vygEH8S6aUhXkSCV+E/ZZP3S Aq2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bdfFdrKD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q5si6029779pgk.46.2018.11.28.01.02.47; Wed, 28 Nov 2018 01:03:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=bdfFdrKD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727667AbeK1UBn (ORCPT + 99 others); Wed, 28 Nov 2018 15:01:43 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:38200 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727341AbeK1UBn (ORCPT ); Wed, 28 Nov 2018 15:01:43 -0500 Received: by mail-pl1-f194.google.com with SMTP id e5so17063842plb.5 for ; Wed, 28 Nov 2018 01:00:50 -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=qjf8kIN07r9YUNX/z6Znftw9nvjqDrKtdHBxoOOxSrECXAreTWrYx+nEOGxX/vsBJp Mei+lxtt4wXMJt6+MRLCmQsvEsjZ8QywQd2iBXbqIo7d6Cuz+kRnAq5GiwF2W6EXJN4Z DhSKGIcec7X+ELOFamumLTspmJBJ2rJL0gQsOImEEMKRE6ZPXbwTxUIaZTrRuP2HOEKv yRp1NHDoE6npLoOlS/IcSh8DarlzNTJkqaYC2YlPoRgQPo2+kroIowLQVbUQphQ237rH OIycaPNZQRuHr3msLg18yPfjpJhtrPcqzAu2l9Al5pdtD1gU8iQS3x/NkPgwqlNhweWu us7Q== X-Gm-Message-State: AA+aEWbSJpUYq/u8CTSw/B/GirdiAp0cGVNlpZ4Qxw8cmLFpVqI+JM/5 brn1AgmXmkzLqCVwPKeWixuSMEOfUKE= 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 Cc: Mark Brown , alsa-devel@alsa-project.org, dgreid@chromium.org, tzungbi@chromium.org, Rohit kumar , Cheng-Yi Chiang Subject: [PATCH v2 1/5] ASoC: qcom: sdm845: Add board specific dapm widgets 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.20.0.rc0.387.gc7a69e6b6c-goog