From patchwork Sat Jul 25 13:17:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 6865071 Return-Path: X-Original-To: patchwork-linux-omap@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 47CD1C05AC for ; Sat, 25 Jul 2015 13:37:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6AFFA20648 for ; Sat, 25 Jul 2015 13:37:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7976520643 for ; Sat, 25 Jul 2015 13:37:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754818AbbGYNhn (ORCPT ); Sat, 25 Jul 2015 09:37:43 -0400 Received: from smtp-out-144.synserver.de ([212.40.185.144]:1030 "EHLO smtp-out-144.synserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754624AbbGYNhn (ORCPT ); Sat, 25 Jul 2015 09:37:43 -0400 X-Greylist: delayed 1224 seconds by postgrey-1.27 at vger.kernel.org; Sat, 25 Jul 2015 09:37:42 EDT Received: (qmail 26068 invoked by uid 0); 25 Jul 2015 13:17:15 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 26033 Received: from ppp-188-174-127-204.dynamic.mnet-online.de (HELO ?192.168.178.30?) [188.174.127.204] by 217.119.54.87 with AES128-SHA encrypted SMTP; 25 Jul 2015 13:17:14 -0000 Message-ID: <55B38C59.8060001@metafoo.de> Date: Sat, 25 Jul 2015 15:17:13 +0200 From: Lars-Peter Clausen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: =?UTF-8?B?UGFsaSBSb2jDoXI=?= , Jarkko Nikula , Peter Ujfalusi CC: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Pavel Machek , Sebastian Reichel , Aaro Koskinen , Tony Lindgren , Nishanth Menon Subject: Re: Nokia N900 - audio TPA6130A2 problems References: <201507251228.27128@pali> In-Reply-To: <201507251228.27128@pali> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 07/25/2015 12:28 PM, Pali Rohár wrote: > Hello, > > sometimes after rebooting Nokia N900 initializing alsa audio fails. > Here output from dmesg log when it happen: > > [ 6.925140] tpa6130a2 2-0060: Write failed > [ 6.929534] tpa6130a2 2-0060: Failed to initialize chip > [ 6.935272] tpa6130a2: probe of 2-0060 failed with error -121 > [ 7.624237] rx51-audio n900-audio: Failed to add TPA6130A2 controls > [ 7.635101] rx51-audio n900-audio: ASoC: failed to init TLV320AIC34: -19 > [ 7.645874] rx51-audio n900-audio: ASoC: failed to instantiate card -19 > [ 7.665740] rx51-audio n900-audio: snd_soc_register_card failed (-19) > [ 8.063049] ALSA device list: > [ 8.070343] No soundcards found. > > Any idea what to do? Looks like the chip is not responding. Try to add a small delay after powerup to give the device to be fully ready, something like the following: --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -152,6 +152,8 @@ static int tpa6130a2_power(u8 power) if (data->power_gpio >= 0) gpio_set_value(data->power_gpio, 1); + msleep(5); + data->power_state = 1; ret = tpa6130a2_initialize(); if (ret < 0) {