From patchwork Fri May 8 12:33:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 226129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DA27C47247 for ; Fri, 8 May 2020 13:15:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEB6F206B8 for ; Fri, 8 May 2020 13:15:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588943744; bh=ckdokyxCcZHS3WWPIBXErXIFlstl00/XsmL+7HOVBiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=IFSzDHwkKSppOBUETBe/oumrqWZ6fhmaV/4c9HxrB+zEVBDLrWqJDke4XJ4lpaloU 6kqn8drM+OPIE43SBtGpmpgYHfV85+7pO+KbSG0DhAu7aZJeFzuGrAjqDh6iqEJ2RW ZHGXRzxnN7bDHuXA3B5WuoQaRMRfVxYQTlltL2As= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729352AbgEHMpy (ORCPT ); Fri, 8 May 2020 08:45:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:46220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729348AbgEHMpy (ORCPT ); Fri, 8 May 2020 08:45:54 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 457A921473; Fri, 8 May 2020 12:45:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588941953; bh=ckdokyxCcZHS3WWPIBXErXIFlstl00/XsmL+7HOVBiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PsUzmY4fcJeAsRqOqAEt4t9YET/f7gNJyxHC569jul3XRVB7hGtNmOz67lxgCe5HK pfNAlsQaHWoEosGBS6ShhGOxmvitPBI1sGZ31CkKRaEG3RvO3OmwlT52WuzIe+tTVg pdWCB4iWPibNFh0llL28CILqnw6Y1+B6bjtoP0PE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?utf-8?q?=C3=89meric_MASCHINO?= , Andy Shevchenko , Takashi Iwai Subject: [PATCH 4.4 239/312] ALSA: fm801: Initialize chip after IRQ handler is registered Date: Fri, 8 May 2020 14:33:50 +0200 Message-Id: <20200508123141.234437570@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200508123124.574959822@linuxfoundation.org> References: <20200508123124.574959822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Andy Shevchenko commit 610e1ae9b533be82b3aa118b907e0a703256913d upstream. The commit b56fa687e02b ("ALSA: fm801: detect FM-only card earlier") rearranged initialization calls, i.e. it makes snd_fm801_chip_init() to be called before we register interrupt handler and set PCI bus mastering. Somehow it prevents FM801-AU to work properly. Thus, partially revert initialization order changed by commit mentioned above. Fixes: b56fa687e02b ("ALSA: fm801: detect FM-only card earlier") Reported-by: Émeric MASCHINO Tested-by: Émeric MASCHINO Signed-off-by: Andy Shevchenko Cc: # v4.5+ Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/fm801.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -1225,8 +1225,6 @@ static int snd_fm801_create(struct snd_c } } - snd_fm801_chip_init(chip); - if ((chip->tea575x_tuner & TUNER_ONLY) == 0) { if (devm_request_irq(&pci->dev, pci->irq, snd_fm801_interrupt, IRQF_SHARED, KBUILD_MODNAME, chip)) { @@ -1238,6 +1236,8 @@ static int snd_fm801_create(struct snd_c pci_set_master(pci); } + snd_fm801_chip_init(chip); + if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_fm801_free(chip); return err;