From patchwork Fri Apr 20 13:09:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10352637 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5239D600CC for ; Fri, 20 Apr 2018 13:09:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4145228574 for ; Fri, 20 Apr 2018 13:09:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35AB1285B5; Fri, 20 Apr 2018 13:09:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EFDF28574 for ; Fri, 20 Apr 2018 13:09:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754966AbeDTNJM (ORCPT ); Fri, 20 Apr 2018 09:09:12 -0400 Received: from osg.samsung.com ([64.30.133.232]:53796 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754936AbeDTNJL (ORCPT ); Fri, 20 Apr 2018 09:09:11 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id B5AD737DE3; Fri, 20 Apr 2018 06:09:10 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mqTReAFV61DV; Fri, 20 Apr 2018 06:09:09 -0700 (PDT) Received: from vento.lan (unknown [179.179.47.30]) by osg.samsung.com (Postfix) with ESMTPSA id 27C7637DDB; Fri, 20 Apr 2018 06:09:07 -0700 (PDT) Date: Fri, 20 Apr 2018 10:09:05 -0300 From: Mauro Carvalho Chehab To: Takashi Iwai Cc: , "Mauro Carvalho Chehab" , "Jaroslav Kysela" , "Linux Media Mailing List" Subject: Re: [PATCH 3/4] sound, media: allow building ISA drivers it with COMPILE_TEST Message-ID: <20180420100905.51e04e82@vento.lan> In-Reply-To: References: <3f4d8ae83a91c765581d9cbbd1e436b6871368fa.1524227382.git.mchehab@s-opensource.com> <20180420095129.2b7d004d@vento.lan> Organization: Samsung X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Em Fri, 20 Apr 2018 14:58:15 +0200 Takashi Iwai escreveu: > On Fri, 20 Apr 2018 14:51:29 +0200, > Mauro Carvalho Chehab wrote: > > > > Em Fri, 20 Apr 2018 14:37:46 +0200 > > Takashi Iwai escreveu: > > > > > On Fri, 20 Apr 2018 14:32:15 +0200, > > > Mauro Carvalho Chehab wrote: > > > > > > > > All sound drivers that don't depend on PNP can be safelly > > > > build with COMPILE_TEST, as ISA provides function stubs to > > > > be used for such purposes. > > > > > > > > As a side effect, with this change, the radio-miropcm20 > > > > can now be built outside i386 with COMPILE_TEST. > > > > > > > > Signed-off-by: Mauro Carvalho Chehab > > > > --- > > > > drivers/media/radio/Kconfig | 3 ++- > > > > sound/isa/Kconfig | 9 +++++---- > > > > 2 files changed, 7 insertions(+), 5 deletions(-) > > > > > > > > diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig > > > > index d363726e9eb1..8fa403c7149e 100644 > > > > --- a/drivers/media/radio/Kconfig > > > > +++ b/drivers/media/radio/Kconfig > > > > @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE > > > > > > > > config RADIO_MIROPCM20 > > > > tristate "miroSOUND PCM20 radio" > > > > - depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND > > > > + depends on ISA || COMPILE_TEST > > > > + depends on ISA_DMA_API && VIDEO_V4L2 && SND > > > > select SND_ISA > > > > select SND_MIRO > > > > ---help--- > > > > diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig > > > > index cb54d9c0a77f..d2a6cdd0395c 100644 > > > > --- a/sound/isa/Kconfig > > > > +++ b/sound/isa/Kconfig > > > > @@ -20,7 +20,8 @@ config SND_SB16_DSP > > > > > > > > menuconfig SND_ISA > > > > bool "ISA sound devices" > > > > - depends on ISA && ISA_DMA_API > > > > + depends on ISA || COMPILE_TEST > > > > + depends on ISA_DMA_API > > > > default y > > > > help > > > > Support for sound devices connected via the ISA bus. > > > > @@ -38,7 +39,7 @@ config SND_ADLIB > > > > > > > > config SND_AD1816A > > > > tristate "Analog Devices SoundPort AD1816A" > > > > - depends on PNP > > > > + depends on PNP && ISA > > > > select ISAPNP > > > > select SND_OPL3_LIB > > > > select SND_MPU401_UART > > > > > > Just from curiosity: what's the reason for this explicit CONFIG_ISA > > > dependency? What error did you get? > > > > Kconfig complains with "select ISAPNP": > > > > WARNING: unmet direct dependencies detected for ISAPNP > > Depends on [n]: PNP [=y] && ISA [=n] > > Selected by [y]: > > - SND_AD1816A [=y] && SOUND [=y] && !UML && SND [=y] && SND_ISA [=y] && PNP [=y] > > > > Because it is declared as: > > > > config ISAPNP > > bool "ISA Plug and Play support" > > depends on ISA > > I see. Then it'd be better to put this explanations in the changelog > as well. Added. See enclosed. > > > I could have tried to change ISAPNP to depends on ISA || COMPILE_TEST, > > but I suspect that would touch on yet another subsystem and has > > the potential to point to other things that need changes, as > > a lot more drivers will be selected. > > > > Anyway, after a quick look at include/linux/isapnp.h, I suspect > > that this can work. > > > > I'll run some tests here. > > At least a dumb stub is there, so let's hope we can widen the test > coverage :) Yes, that's the idea :-) Right now, for every patch I receive, I build media drivers for i386 (I just made all of them build on i386), but I'm considering doing such builds on x86_64 instead, as it also enables compat32 code. Thanks, Mauro [PATCH v2] sound, media: allow building ISA drivers it with COMPILE_TEST All sound drivers that don't depend on PNP can be safelly build with COMPILE_TEST, as ISA provides function stubs to be used for such purposes. As a side effect, with this change, the radio-miropcm20 can now be built outside i386 with COMPILE_TEST. It should be noticed that ISAPNP currently depends on ISA. So, on drivers that depend on it, we need to add an explicit dependency on ISA, at least until another patch removes it. Signed-off-by: Mauro Carvalho Chehab --- v2: only patch description changed, with the addition of a note about ISA explicit dependency on 3 drivers. diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index d363726e9eb1..8fa403c7149e 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -372,7 +372,8 @@ config RADIO_GEMTEK_PROBE config RADIO_MIROPCM20 tristate "miroSOUND PCM20 radio" - depends on ISA && ISA_DMA_API && VIDEO_V4L2 && SND + depends on ISA || COMPILE_TEST + depends on ISA_DMA_API && VIDEO_V4L2 && SND select SND_ISA select SND_MIRO ---help--- diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index cb54d9c0a77f..d2a6cdd0395c 100644 --- a/sound/isa/Kconfig +++ b/sound/isa/Kconfig @@ -20,7 +20,8 @@ config SND_SB16_DSP menuconfig SND_ISA bool "ISA sound devices" - depends on ISA && ISA_DMA_API + depends on ISA || COMPILE_TEST + depends on ISA_DMA_API default y help Support for sound devices connected via the ISA bus. @@ -38,7 +39,7 @@ config SND_ADLIB config SND_AD1816A tristate "Analog Devices SoundPort AD1816A" - depends on PNP + depends on PNP && ISA select ISAPNP select SND_OPL3_LIB select SND_MPU401_UART @@ -66,7 +67,7 @@ config SND_AD1848 config SND_ALS100 tristate "Diamond Tech. DT-019x and Avance Logic ALSxxx" - depends on PNP + depends on PNP && ISA select ISAPNP select SND_OPL3_LIB select SND_MPU401_UART @@ -107,7 +108,7 @@ config SND_AZT2316 config SND_AZT2320 tristate "Aztech Systems AZT2320" - depends on PNP + depends on PNP && ISA select ISAPNP select SND_OPL3_LIB select SND_MPU401_UART