From patchwork Thu Jun 4 08:59:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michele Curti X-Patchwork-Id: 6544941 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A45CF9F326 for ; Thu, 4 Jun 2015 08:59:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 96C1020784 for ; Thu, 4 Jun 2015 08:59:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 2C69220782 for ; Thu, 4 Jun 2015 08:59:56 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id DDD462660A4; Thu, 4 Jun 2015 10:59:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_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 C4B8D2606A9; Thu, 4 Jun 2015 10:59:47 +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 BFE00265E0D; Thu, 4 Jun 2015 10:59:45 +0200 (CEST) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by alsa0.perex.cz (Postfix) with ESMTP id A0C9F26065C for ; Thu, 4 Jun 2015 10:59:38 +0200 (CEST) Received: by wibdt2 with SMTP id dt2so41391035wib.1 for ; Thu, 04 Jun 2015 01:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ysOoskgN959W8AdTdtLWQluEdIK+Kp767v6ZlQT3Tkc=; b=JJ49mp+GOvSNB+vaK88w/iLqeK9XPMnsRZfEBEENN5FwEk0yjct3dIgxViQFHuhhTe sCktn4dbydOsEOkVc7u245w4BotwmM8Mujlx/fsVJKsa0rNaADvBl6OwKglXIvZyRpmG xGYTXm+5XBkgn7HNVq1PA19HMmn3B9QtSGH7jeOlbp8jeNHrJt61GoFjicRiKdLkgwqd pOEDNx0CWBctOAWNh9slZRFQGVvCvVYRaSNGuoHXGOOoX6/nE0KSE/t/BFM+RwjnaFhU Hprt/OlZgjqZSonoUtHCfoOa3u14u7gHA4aLJ8smmB86mtAY86LIiw4SxaV9TRW7xvBA MHTw== X-Received: by 10.180.96.196 with SMTP id du4mr49446335wib.77.1433408378346; Thu, 04 Jun 2015 01:59:38 -0700 (PDT) Received: from dellaz (host79-90-static.72-81-b.business.telecomitalia.it. [81.72.90.79]) by mx.google.com with ESMTPSA id fm8sm5341091wib.9.2015.06.04.01.59.35 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 04 Jun 2015 01:59:37 -0700 (PDT) Date: Thu, 4 Jun 2015 10:59:33 +0200 From: Michele Curti To: Liam Girdwood Message-ID: <20150604085933.GA8494@dellaz> References: <20150527085440.GA4445@dellaz> <1432752116.8235.25.camel@loki> <20150527201320.GA309@asus> <1432812668.2726.18.camel@loki> <20150528125325.GA418@asus> <1432819294.2726.33.camel@loki> <20150528191721.GA608@asus> <1432892521.2732.14.camel@loki> <20150529131753.GA339@asus> <1433156768.2642.21.camel@loki> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1433156768.2642.21.camel@loki> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Takashi Iwai , Bard Liao , alsa-devel@alsa-project.org, "Nikula, Jarkko" Subject: Re: [alsa-devel] writing an alsa driver 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 On Mon, Jun 01, 2015 at 12:06:08PM +0100, Liam Girdwood wrote: > + Jarkko > > On Fri, 2015-05-29 at 15:17 +0200, Michele Curti wrote: > > On Fri, May 29, 2015 at 10:42:01AM +0100, Liam Girdwood wrote: > > > On Thu, 2015-05-28 at 21:17 +0200, Michele Curti wrote: > > > > > > > to let the probe continue, the system become quite unusable but I get the > > > > logs. > > > > > > > > May 28 20:34:00 asus kernel: byt-rt5645 byt-rt5645: ASoC: CPU DAI baytrail-pcm-audio not registered > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: initialising Byt DSP IPC > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: initialising audio DSP id 0xf28 > > > > May 28 20:34:00 asus kernel: irq used for dsp = 6 > > > > > > > > ---> The IRQ number used is 6 > > > > > > Jarkko thinks the IRQ may be incorrectly reported by ACPI and that it > could be using another ACPI index. This could probably be checked by > decompiling the ACPi data and searching for the audio DSP. Thanks, I'll try. I'm back now from a period of limited internet access, I tried to change the irqindex_host_ipc to 0 (like the others platforms) and the sound card showed up. So I tried to play a bit with alsamixer and got some cracking noise. Tried to play some songs but a song of 4 minutes finished in about a dozen of seconds.. Maybe the clocks are not correctly configured.. After a while I smelt a smell of burnt components and the chassis near the speakers was hot like hell. Shutdown the laptop. Now I'm not sure the hardware is damaged, after a couple of hours I tried to reboot and got a (strange) beep during boot, so maybe I was lucky.. Anyway, now I removed the change. > > > > > May 28 20:34:00 asus kernel: [101B blob data] > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x160 bytes at offset 0xc0000 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block allocated 0:0 at offset 0xc0000 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x170 bytes at offset 0xc0400 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x10 bytes at offset 0xc0578 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x10 bytes at offset 0xc0598 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x10 bytes at offset 0xc05b8 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x10 bytes at offset 0xc05d8 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x10 bytes at offset 0xc05f8 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x8 bytes at offset 0xc0618 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x10 bytes at offset 0xc0638 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x30 bytes at offset 0xc0658 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x10438 bytes at offset 0xc06a0 type 0 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block allocated 0:1 at offset 0xc8000 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block allocated 0:2 at offset 0xd0000 > > > > May 28 20:34:00 asus kernel: rt5645 i2c-10EC5648:00: Requesting IRQ 146 > > > > May 28 20:34:00 asus kernel: rt5645 i2c-10EC5648:00: Requesting gpio 0 > > > > May 28 20:34:00 asus kernel: rt5645 i2c-10EC5648:00: Fail gpio_request hp_det_gpio > > > > May 28 20:34:00 asus kernel: gpiod_direction_input: invalid GPIO > > > > May 28 20:34:00 asus kernel: rt5645 i2c-10EC5648:00: Fail gpio_direction hp_det_gpio > > > > May 28 20:34:00 asus kernel: byt-rt5645 byt-rt5645: ASoC: CPU DAI baytrail-pcm-audio not registered > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x1a310 bytes at offset 0x400000 type 3 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x5738 bytes at offset 0x100010 type 1 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block allocated 1:0 at offset 0x100000 > > > > May 28 20:34:00 asus kernel: Linux video capture interface: v2.00 > > > > May 28 20:34:00 asus kernel: intel_rapl: Found RAPL domain package > > > > May 28 20:34:00 asus kernel: intel_rapl: Found RAPL domain core > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block request 0x10ad8 bytes at offset 0x105750 type 1 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block allocated 1:1 at offset 0x108000 > > > > May 28 20:34:00 asus kernel: baytrail-pcm-audio baytrail-pcm-audio: block allocated 1:2 at offset 0x110000 > > > > May 28 20:34:00 asus kernel: byt-rt5645 byt-rt5645: ASoC: CPU DAI baytrail-pcm-audio not registered > > > > > > > > > This is confusing as we can see messages about the baytrail-pcm-audio > > > device not being registered and then valid messages from said device ? > > > I'm wondering if you have created 2 baytrail-pcm-audio devices ? The > > > ordering is also confusing since the block allocation should come before > > > the DSP boot.... > > > > > > Can you paste the diff for all the audio changes you have made and also > > > the output of lsmod when this happens. > > > > > > > Sure, sorry for the number of attachments.. :p > > Ok, I can see something that might be causing the potential double > registration of the PCM driver. Can you change the cpu_dai_name in your > machine driver to "Baytrail PCM". Will do, thanks, Michele > > Liam > diff --git a/sound/soc/intel/common/sst-acpi.c b/sound/soc/intel/common/sst-acpi.c index 42f293f..7cc64e3 100644 --- a/sound/soc/intel/common/sst-acpi.c +++ b/sound/soc/intel/common/sst-acpi.c @@ -258,7 +258,7 @@ static struct sst_acpi_desc sst_acpi_baytrail_desc = { .resindex_lpe_base = 0, .resindex_pcicfg_base = 1, .resindex_fw_base = 2, - .irqindex_host_ipc = 5, + .irqindex_host_ipc = 0, .sst_id = SST_DEV_ID_BYT, .resindex_dma_base = -1, };