From patchwork Mon Dec 21 20:50:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 7897731 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 011399F32E for ; Mon, 21 Dec 2015 20:50:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C8B020600 for ; Mon, 21 Dec 2015 20:50:55 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 669D8205BC for ; Mon, 21 Dec 2015 20:50:50 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 814A62615C0; Mon, 21 Dec 2015 21:50:48 +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, NO_DNS_FOR_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 8557A2608B1; Mon, 21 Dec 2015 21:50:40 +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 A8734261481; Mon, 21 Dec 2015 21:50:39 +0100 (CET) Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by alsa0.perex.cz (Postfix) with ESMTP id BD605260601 for ; Mon, 21 Dec 2015 21:50:32 +0100 (CET) Received: by mail-wm0-f47.google.com with SMTP id l126so85142803wml.0 for ; Mon, 21 Dec 2015 12:50:32 -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=d7qhtQm0YFyZ2w7ANZ3SX84lIEJiDuZJsJW+ZeLry/A=; b=VYKXz8FUsru1oIXHiIYw8KnxBcxiLVjhJukg6Wefis7BZrEDLmTKuYxgitoinLHq7c GJyYuMevTRbODMI1awLZYDqb00SsVtCd13MW+IHUEBi10tlsotcmb3cKGfhqGP366zIz shmOFuVYDnSuR4D16eiVzpW9n5JHePzdSFgJuJXXOFOyY2VlWXA3EfzZZPjfjsbITSyy ZUd/+OmCOAWbvqU2D1ffxBoYXEuYJDgFB/Sv2SDWyEJ2BQ3+WtNWM++7zbG7Jiu8StXt wHmPKMGazOxfRLPYclFvluZPNdF63HU3eDcX6DYTMcQZNgL0N8c09ucKuTT7I1AfvcsJ kVjg== X-Received: by 10.28.225.6 with SMTP id y6mr24173241wmg.58.1450731032459; Mon, 21 Dec 2015 12:50:32 -0800 (PST) Received: from ?IPv6:2003:62:5f55:ba00:cd0a:10db:7883:bf5f? (p200300625F55BA00CD0A10DB7883BF5F.dip0.t-ipconnect.de. [2003:62:5f55:ba00:cd0a:10db:7883:bf5f]) by smtp.googlemail.com with ESMTPSA id z13sm29802637wjr.47.2015.12.21.12.50.31 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Dec 2015 12:50:31 -0800 (PST) From: Heiner Kallweit To: Takashi Iwai Message-ID: <56786611.9010203@gmail.com> Date: Mon, 21 Dec 2015 21:50:25 +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] 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 This could be partially reused for the hda_tegra driver as it also uses struct azx. Signed-off-by: Heiner Kallweit --- sound/pci/hda/hda_controller.h | 2 ++ sound/pci/hda/hda_intel.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h index ec63bbf..9c6344f 100644 --- a/sound/pci/hda/hda_controller.h +++ b/sound/pci/hda/hda_controller.h @@ -125,6 +125,8 @@ struct azx { int num_streams; const int *jackpoll_ms; /* per-card jack poll interval */ + char irq_descr[32]; /* Interrupt description */ + /* Register interaction. */ const struct hda_controller_ops *ops; diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 83800ac..ef4e06b 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->irq_descr, chip)) { dev_err(chip->card->dev, "unable to grab IRQ %d, disabling device\n", chip->pci->irq); @@ -1605,6 +1605,8 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci, check_msi(chip); chip->dev_index = dev; chip->jackpoll_ms = jackpoll_ms; + snprintf(chip->irq_descr, sizeof(chip->irq_descr), "%s:%s", + KBUILD_MODNAME, dev_name(&card->card_dev)); INIT_LIST_HEAD(&chip->pcm_list); INIT_WORK(&hda->irq_pending_work, azx_irq_pending_work); INIT_LIST_HEAD(&hda->list);