From patchwork Wed Jun 18 08:56:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4374471 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CDA2DBEEAA for ; Wed, 18 Jun 2014 09:01:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0763020303 for ; Wed, 18 Jun 2014 09:01:43 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 41F1C2020F for ; Wed, 18 Jun 2014 09:01:41 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4A9A926576E; Wed, 18 Jun 2014 11:01:40 +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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id A021B265684; Wed, 18 Jun 2014 10:57:58 +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 E1F7F265684; Wed, 18 Jun 2014 10:57:56 +0200 (CEST) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by alsa0.perex.cz (Postfix) with ESMTP id D4A502656A9 for ; Wed, 18 Jun 2014 10:56:41 +0200 (CEST) Received: by mail-pd0-f170.google.com with SMTP id z10so496123pdj.29 for ; Wed, 18 Jun 2014 01:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:sender:message-id:from:subject:user-agent:to:cc:in-reply-to :references:mime-version:content-type; bh=5mgCWmYaCW1jzE03CTjgGL642guqn3390HkvNKk/gXI=; b=dWbeIc04+N1dF4+DhQlB5xtNQLE5KH4pv739CLgT3Je+pTAYyiVp/kCDHdXWOEKVYh NODYEqWGrCrXk/eFMaB9Hfj2XkFxHEYKg6V7eQOt/q1HdhmeOcw1Ke58kW+XJ+BAosQ2 DlzczF7db9rNa1aVP5KxVAwwFHC3yHL8zPrB+vzfrG5PcHgD3LJ+C/HSt5gVCuT79ph2 qh6dqMj+lh5JBwaNiexhdVRw9Y3hCIuTXBIdulgu1Hv93evD0YDquKxLLh4Gi4JeD1FU p+A+/32gmzrCLerE75pBC/qhjueNq8uA63wripvHQXRW+YNO7VsMG+H2EHNXC/v1EJ1Z vXWg== X-Received: by 10.66.254.198 with SMTP id ak6mr807695pad.156.1403081801002; Wed, 18 Jun 2014 01:56:41 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id ec2sm2255257pbc.63.2014.06.18.01.56.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 18 Jun 2014 01:56:40 -0700 (PDT) Date: Wed, 18 Jun 2014 01:56:40 -0700 (PDT) Message-ID: <87zjhay4s6.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Mark Brown In-Reply-To: <87d2e6zjhf.wl%kuninori.morimoto.gx@gmail.com> References: <87d2e6zjhf.wl%kuninori.morimoto.gx@gmail.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: linux-sh@vger.kernel.org, Linux-ALSA , Simon , Kuninori Morimoto , Liam Girdwood Subject: [alsa-devel] [PATCH 09/12] ASoC: rsnd: enable SRC setting via DT 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 From: Kuninori Morimoto some special board wants to exchange sampling rate by using SRC. This patch enables its settings. Signed-off-by: Kuninori Morimoto --- .../devicetree/bindings/sound/renesas,rsnd.txt | 2 +- sound/soc/sh/rcar/src.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index 41a120c..1d88d42 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt @@ -24,7 +24,7 @@ SSI subnode properties: - no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case SRC subnode properties: -no properties at this point +- convert-rate : SRC convert rate if needed DAI subnode properties: - playback : list of playback modules diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 4d39505..93a5e58 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c @@ -612,11 +612,11 @@ static void rsnd_of_parse_src(struct platform_device *pdev, const struct rsnd_of_data *of_data, struct rsnd_priv *priv) { - struct device_node *src_node; + struct device_node *src_node, *np; struct rcar_snd_info *info = rsnd_priv_to_info(priv); struct rsnd_src_platform_info *src_info; struct device *dev = &pdev->dev; - int nr; + int nr, i; if (!of_data) return; @@ -640,6 +640,16 @@ static void rsnd_of_parse_src(struct platform_device *pdev, info->src_info = src_info; info->src_info_nr = nr; + i = 0; + for_each_child_of_node(src_node, np) { + src_info = info->src_info + i; + + of_property_read_u32(src_node, "convert-rate", + &src_info->convert_rate); + + i++; + } + rsnd_of_parse_src_end: of_node_put(src_node); }