From patchwork Fri Aug 7 16:03:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Girdwood X-Patchwork-Id: 6970831 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B7E13C05AC for ; Fri, 7 Aug 2015 16:05:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB97C20613 for ; Fri, 7 Aug 2015 16:05:22 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id EC352204EB for ; Fri, 7 Aug 2015 16:05:21 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9C0802650DB; Fri, 7 Aug 2015 18:05:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 5B47C261AA3; Fri, 7 Aug 2015 18:04:12 +0200 (CEST) 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 CC296261A68; Fri, 7 Aug 2015 18:04:10 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id DB0C926066D for ; Fri, 7 Aug 2015 18:04:04 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 07 Aug 2015 09:04:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,630,1432623600"; d="scan'208";a="744224947" Received: from euzan-mobl3.ger.corp.intel.com (HELO loki.ger.corp.intel.com) ([10.252.23.54]) by orsmga001.jf.intel.com with ESMTP; 07 Aug 2015 09:04:02 -0700 From: Liam Girdwood To: Date: Fri, 7 Aug 2015 17:03:54 +0100 Message-Id: <1438963434-6407-4-git-send-email-liam.r.girdwood@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438963434-6407-1-git-send-email-liam.r.girdwood@linux.intel.com> References: <1438963434-6407-1-git-send-email-liam.r.girdwood@linux.intel.com> Cc: Takashi Iwai , Mengdong Lin , Mark Brown , Liam Girdwood Subject: [alsa-devel] [PATCH 3/3] topology: add support for adding bytes controls to 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mengdong Lin Widgets can now contain byte controls. Signed-off-by: Mengdong Lin Signed-off-by: Liam Girdwood --- src/topology/dapm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/topology/dapm.c b/src/topology/dapm.c index 25d11d7..4217211 100644 --- a/src/topology/dapm.c +++ b/src/topology/dapm.c @@ -160,6 +160,10 @@ static int tplg_build_widget(snd_tplg_t *tplg, err = copy_dapm_control(elem, ref->elem); break; + case SND_TPLG_TYPE_BYTES: + if (!ref->elem) + ref->elem = tplg_elem_lookup(&tplg->bytes_ext_list, + ref->id, SND_TPLG_TYPE_BYTES); if (ref->elem) err = copy_dapm_control(elem, ref->elem); break;