From patchwork Mon Aug 11 02:10:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Smirl X-Patchwork-Id: 4705291 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 752589F375 for ; Mon, 11 Aug 2014 02:11:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7292A20173 for ; Mon, 11 Aug 2014 02:11:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4C90E20166 for ; Mon, 11 Aug 2014 02:11:14 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 18DC5264FF9; Mon, 11 Aug 2014 04:11:12 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NO_DNS_FOR_FROM, 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 186D3264FFB; Mon, 11 Aug 2014 04:11:01 +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 F11AB26500C; Mon, 11 Aug 2014 04:10:59 +0200 (CEST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by alsa0.perex.cz (Postfix) with ESMTP id BAC4D264FF9 for ; Mon, 11 Aug 2014 04:10:51 +0200 (CEST) Received: by mail-la0-f51.google.com with SMTP id pn19so6161680lab.38 for ; Sun, 10 Aug 2014 19:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=y8gSPlCt7tn9P8MHWoLEuL4W8NPCrzFqxFUbtFcguNM=; b=dN4cz+m0o1+AS76bM8GzSS20SCBZ07VWq71q/Zq1c/h8I25nce+UM2qORo3dD6A9D2 GNS/U5aasIY+rGgW7o8HHyltim5rLNscw3Fp85Dv7OA5X0WunBr9ApJXNr7RsNVYwrlw xNrrWc+WUEMY73idUO4IZdEjYjHvCzhrdcQeZtOJNFL7tqy8CzS87SD0SUaMXnd3dfNQ 26MalIsYW3TnAd8JAiNkQSaKQpVELkapxo4KT80DPxADEoKuKL3FUK8TFYTWDoCcqXcy 3+8hwPWhd3G4AzgxQ3g6MaInycjE4QGooRQnYsE/avhIaMvTFuW8J5b5xXWIRBZKkqhP AjKQ== MIME-Version: 1.0 X-Received: by 10.152.3.65 with SMTP id a1mr5495119laa.76.1407723051227; Sun, 10 Aug 2014 19:10:51 -0700 (PDT) Received: by 10.112.40.167 with HTTP; Sun, 10 Aug 2014 19:10:51 -0700 (PDT) In-Reply-To: References: <20140810105405.GW17528@sirena.org.uk> Date: Sun, 10 Aug 2014 22:10:51 -0400 Message-ID: From: "jonsmirl@gmail.com" To: Mark Brown Cc: alsa-devel mailing list , Lars-Peter Clausen , Liam Girdwood , zengzm.kernel@gmail.com, Kuninori Morimoto Subject: Re: [alsa-devel] Choosing the sysclk in simple-card looks broken to me. 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 As I debug further I am getting a better understanding of the problem. This is my simple-audio binding. sound { compatible = "simple-audio-card"; simple-audio-card,format = "i2s"; simple-audio-card,cpu { sound-dai = <&iis0>; }; simple-audio-card,codec { clocks = <&iis0>; sound-dai = <&sgtl5000>; }; }; I'm having trouble with the simple-audio-card,cpu node, not the simple-audio-card,codec node. As simple-audio is currently implemented when simple-audio-card,cpu is processed it will pick up my 80Mhz apb clock and set it as sysclk. After spending all day trying to fix that else clause, I'm coming to the conclusion that the else clause simply shouldn't be there at all. I just hit this because I had code checking for bogus values in setsysclk. diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 03a7fdc..b389d9c2 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -155,10 +155,6 @@ asoc_simple_card_sub_parse_of(struct device_node *np, of_property_read_u32(np, "system-clock-frequency", &dai->sysclk); - } else { - clk = of_clk_get(node, 0); - if (!IS_ERR(clk)) - dai->sysclk = clk_get_rate(clk); } return 0;