From patchwork Tue Dec 22 18:09:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 7906301 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 E6B359F349 for ; Tue, 22 Dec 2015 18:10:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA5A12053C for ; Tue, 22 Dec 2015 18:10:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AEEA920439 for ; Tue, 22 Dec 2015 18:10:28 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id DF4ED265B03; Tue, 22 Dec 2015 19:10:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 88CA9265B4C; Tue, 22 Dec 2015 19:09:55 +0100 (CET) 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 1E4BD265B4C; Tue, 22 Dec 2015 19:09:54 +0100 (CET) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by alsa0.perex.cz (Postfix) with ESMTP id D2582265B54 for ; Tue, 22 Dec 2015 19:09:15 +0100 (CET) Received: by mail-wm0-f45.google.com with SMTP id p187so119111386wmp.1 for ; Tue, 22 Dec 2015 10:09:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=8b7dxzq3D0/OAlYGpLDoTy3jP8K74dzJQKqjUqOH+Ts=; b=jbNrDCqW5vDhcl+s43qR/1C0SKd7z9QtgnKKLqVm7UbNEYDjo9zgBkQFk1DlKPT3kh 2OZau4a6rcWQ4ilawNffwXKHzQcNYcAK4cjyLSN1+GO4vEo++FL2HnjNWXyFg5vOwR75 jDZFBspN2wdOPBzDjXNJAAl5eBhP0ql9/+hFrHLBYkdSd/X1A9obZ2b4i+KAZUHYQp0Q XjYtQAYL6nm39j50m4ksJCAlW9XqxbvIA7iufZvNgUlXZD6hNJ8yjoglw7GvoC+hLgMQ 1MGtyx/q+gJqdElyP0RVw/sqKIEzBLdbPdBBwHirNDK0LlizEKaU8iL0lNaIex8keOT9 V0AQ== X-Received: by 10.194.63.238 with SMTP id j14mr32546917wjs.172.1450807755518; Tue, 22 Dec 2015 10:09:15 -0800 (PST) Received: from ?IPv6:2003:62:5f55:ba00:1cd6:ef72:41cc:b201? (p200300625F55BA001CD6EF7241CCB201.dip0.t-ipconnect.de. [2003:62:5f55:ba00:1cd6:ef72:41cc:b201]) by smtp.googlemail.com with ESMTPSA id m16sm26048959wmb.13.2015.12.22.10.09.12 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Dec 2015 10:09:14 -0800 (PST) From: Heiner Kallweit To: Takashi Iwai Message-ID: <567991C1.3040507@gmail.com> Date: Tue, 22 Dec 2015 19:09:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH v2] sound: hda_intel: add card number to irq description 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 Currently the info in /proc/interrupts doesn't allow to figure out which interrupt belongs to which card (HDMI, PCH, ..). Therefore add card details to the interrupt description. With the patch the info in /proc/interrupts looks like this: PCI-MSI 442368-edge snd_hda_intel:card1 PCI-MSI 49152-edge snd_hda_intel:card0 Signed-off-by: Heiner Kallweit --- v2: Make extension more generic and implement it in snd_card. This way every driver using struct snd_card can easily be switched to using the more descriptive irq describer. --- include/sound/core.h | 1 + sound/core/init.c | 3 +++ sound/pci/hda/hda_intel.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/sound/core.h b/include/sound/core.h index cdfecaf..31079ea 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -99,6 +99,7 @@ struct snd_card { char driver[16]; /* driver name */ char shortname[32]; /* short name of this soundcard */ char longname[80]; /* name of this soundcard */ + char irq_descr[32]; /* Interrupt description */ char mixername[80]; /* mixer name */ char components[128]; /* card components delimited with space */ diff --git a/sound/core/init.c b/sound/core/init.c index 20f37fb..6bda843 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -268,6 +268,9 @@ int snd_card_new(struct device *parent, int idx, const char *xid, if (err < 0) goto __error; + snprintf(card->irq_descr, sizeof(card->irq_descr), "%s:%s", + dev_driver_string(card->dev), dev_name(&card->card_dev)); + /* the control interface cannot be accessed from the user space until */ /* snd_cards_bitmask and snd_cards are set with snd_card_register */ err = snd_ctl_create(card); diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 83800ac..c0bef11 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -725,7 +725,7 @@ static int azx_acquire_irq(struct azx *chip, int do_disconnect) if (request_irq(chip->pci->irq, azx_interrupt, chip->msi ? 0 : IRQF_SHARED, - KBUILD_MODNAME, chip)) { + chip->card->irq_descr, chip)) { dev_err(chip->card->dev, "unable to grab IRQ %d, disabling device\n", chip->pci->irq);