Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3347634imu; Sat, 24 Nov 2018 03:11:00 -0800 (PST) X-Google-Smtp-Source: AJdET5cugN4B2nVxqHpDpL3zGWDtrxCb+d9KWlmkucx1irhB3P8fDPVxkh5HpYNf6o/mfQR0G6GL X-Received: by 2002:a63:2f07:: with SMTP id v7mr16498644pgv.368.1543057860243; Sat, 24 Nov 2018 03:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543057860; cv=none; d=google.com; s=arc-20160816; b=hlD2YqGDBLN6J3n7Ih10lOT55IM2K5/iwN3rQetU7FIGM8ds/kK4rSRaIS+/G4mrou K9EE5fgQgt9WvpUvnAyQaXToTFatI9rioVTcILTSiCxsr7OhBBI15qNmE/1d2E7gPqwV X0d2uFUsVpZRVtOyfbTTJrMrDLp7OoZL6dCKPaRQttmTMufzBSH2ZZEj0Bk/DYeCJ42E P/daN0tZ3eS1WezKx1t9AKmVrJJkqCMr3f25nTLuusu0TESbJAZR/PPNlo3aGkMsj2Qd dsvL+4usXPs5SaeErH1wQUkEa2+zAa7E6NMQJwctqNtFFQDhEavBt+i9URR1+UaqMD03 C+wA== 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=tbyZQlFEy1s8jr9xE7MELOXOHxvbKZujq1IhGxUBAy65O7LQlfLuCvYFmO3m00Rihv SjxvkjyM3ZWJRaz2rOYgbdU9yLXOD2pDJ56NhDexDYxJeQ5w2zbZV24OVGFkOIUqHVBo mCoU/hfrF4LX4CooPdYNcPVmZ8+nvAzsLaU2sv1IdxUTCyszw0ZCKrRvJUKJRRoJdqqu x8jG86MjFO+XxT0PeOY6rzWfD1RGKKQ1CYf8D04A1xWV43OdLBDUM8vF5HwbfK0Xr7qw OAGpihKUdCkOro0Ng3W87uc79P7SLoTPsaQRVekgvPXvfZSzjonK7MFfc7gDr8pn8PFg QgTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=U5KrbeDO; 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 f22si45065028pgm.81.2018.11.24.03.10.42; Sat, 24 Nov 2018 03:11:00 -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=U5KrbeDO; 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 S1726154AbeKXV6O (ORCPT + 99 others); Sat, 24 Nov 2018 16:58:14 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34345 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725844AbeKXV6O (ORCPT ); Sat, 24 Nov 2018 16:58:14 -0500 Received: by mail-pf1-f196.google.com with SMTP id h3so4403851pfg.1 for ; Sat, 24 Nov 2018 03:10:02 -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=WW0LfzXvRiR5tl1C4L5EDmVmLpqCizQG5mXwbeco7lXb99Vt9w+y9MZp/KdcgkaqPN qw52bkKOC6jqe5sAROp8A4vi2Z+LVns1aL6QrcEZ9o8kn69oqdI59mLaCqlknZqdyQqO 08Cu2Fo450B9+ywFOtymqdO0WrwnzSJdx3vK0SNkGvRFIBY9McUdSvO8gv2reVdhuiDo MUy16qYVenqax6VSXyyg3YRaP5NmeONv/ziO/7+KWuHEP1FUXq+IyuWRQCXe8xB2bHWa gzqTmWZE9jacgx0XYDP03k2RgFjF0dHvSo8TGK7mK1gb4UTkq7uI7lmAf15S5Pl/DmdK A/JA== X-Gm-Message-State: AA+aEWbnT6tHnNkec8sEUTNjTmPAhIcqhDxc4cF+1XPyjNyhUyUz4wBf SO8f1G1NPaRTdiLc7DVbME4g7jZM2YU= 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 Cc: Mark Brown , oder_chiou@realtek.com, alsa-devel@alsa-project.org, dgreid@chromium.org, tzungbi@chromium.org, Rohit kumar , Cheng-Yi Chiang Subject: [PATCH 1/4] ASoC: qcom: sdm845: Add board specific dapm widgets 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 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