From patchwork Thu Feb 27 17:32:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Reid X-Patchwork-Id: 3734931 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5DC389F35F for ; Thu, 27 Feb 2014 17:33:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 447992024F for ; Thu, 27 Feb 2014 17:33:07 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AF92B20240 for ; Thu, 27 Feb 2014 17:33:04 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D3A022658EA; Thu, 27 Feb 2014 18:33:00 +0100 (CET) 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_SIGNED, NO_DNS_FOR_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 B2D872658A5; Thu, 27 Feb 2014 18:32:50 +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 A869A2658B4; Thu, 27 Feb 2014 18:32:48 +0100 (CET) Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com [209.85.216.181]) by alsa0.perex.cz (Postfix) with ESMTP id 8B08B26589B for ; Thu, 27 Feb 2014 18:32:42 +0100 (CET) Received: by mail-qc0-f181.google.com with SMTP id c9so3639629qcz.12 for ; Thu, 27 Feb 2014 09:32:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=S9xYArI7lNq3IvhIgAc5cEKPqF8N55MG/aC7d5oRMq4=; b=m7pPHkojGw7eSxMyP+V4EdZYtyIDJDQZucbX+zj+1Ke6sENV4mkUkLLGgs0kEWraBv Akoj6q+EnG/Fs3Opa1SesOUAZbmK0szqGX426IeBxNCj7Dfsb1fu9jGON+xCcNVzqTrR RhQw0Oj6FJMudjWX5XkTKf4Qa55lvDjySPsVrtOoiQNHMZ4c70/S2ii28OT41qZTWwww x9agg425GSAObFGPx6fg0wYnXPA33xULgIHAHiV72znB52TmvvEVSH9uiFNmYR+CtIjt FwQ7kggqT1MpssQ9qVb9hpNk6eLx5wMyAeE47AJZpBdr/4E9XWeSY84lf+SJgiDueceO y96A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=S9xYArI7lNq3IvhIgAc5cEKPqF8N55MG/aC7d5oRMq4=; b=fCRsag4HwMEkK7TH9ccNVcsbIKF8bVigsPopy3Zr729Fp37aHl34MVMx448qAJUG1A uHkkIVfkxeuEAns43ulmxJcfqvOAuyPVV5ig7BCBPm1atcMoMsU5QNNavLsoXMqRD+Rt t+osRvggB8CIO8fazlyHskylPaqpFMBH4HwSg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=S9xYArI7lNq3IvhIgAc5cEKPqF8N55MG/aC7d5oRMq4=; b=iuH4Vc9FIkqN9TbjGDmATGyx4Fm0XrhZNZIwMrnFf8gsQtgvXin5U4afUiFT/XKaM7 OsSwPD1PnQeVLMAvIqa97NbHYyLRSWwmRgccMXdopXV+Dp/+TlsCcywrB1JbBa479lL6 Y6k4SxiOOFftN13gtig7VaiYEOTAdMwjYw5vAV/0bU7NkJjV0wqCmVaqQ30nBINs0y6G QevWEjrgpLdUpKo+mIjO9XMqUvWoUaLBPThF0SInGa38IG73pyoEkXTsZLywRxZpz7EE kbQrFyVm29m0djY5C2ld2LXuwA2Lrs/7UEZPVHUXvGc+nqUJURm6zkGG2oY1HKGblU3M +q4A== X-Gm-Message-State: ALoCoQlRxYcbYrZdENgjrMn+ZuE19YCgYHmW1/1ieqBWXCFenV5wCePZNN6si2nZIIqPdQJnAMlHHCbnDVIaf+9kG0XDhDkd9AVP59UqNqoT3LFz7KnrldXolgwSv2uLaCQ6QsnZkdYClx2Am8dVVfjhvpIQiBAz8lMfKAZDO8Q75wHy2ituMI+L5lzzVUuYWzOYO8h3zAeP7fXMM3SGrwJADQnaSDA+Yg== X-Received: by 10.224.36.195 with SMTP id u3mr18228716qad.59.1393522361359; Thu, 27 Feb 2014 09:32:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.226.73 with HTTP; Thu, 27 Feb 2014 09:32:21 -0800 (PST) In-Reply-To: References: <1392455855-10594-1-git-send-email-tiwai@suse.de> <5303A0A3.6050206@wwwdotorg.org> From: Dylan Reid Date: Thu, 27 Feb 2014 09:32:21 -0800 X-Google-Sender-Auth: 3fjdmzt_yePdfSy6UmPb9ZCr_LI Message-ID: To: Takashi Iwai Cc: alsa-devel@alsa-project.org, Stephen Warren Subject: Re: [alsa-devel] [PATCH 1/3] ALSA: hda - Remove dependency on bus->pci in hda_beep.c 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 Thu, Feb 27, 2014 at 8:57 AM, Takashi Iwai wrote: > At Thu, 27 Feb 2014 08:44:48 -0800, > Dylan Reid wrote: >> >> On Thu, Feb 27, 2014 at 4:03 AM, Takashi Iwai wrote: >> > At Wed, 19 Feb 2014 07:16:38 -0800, >> > Dylan Reid wrote: >> >> >> >> On Wed, Feb 19, 2014 at 12:33 AM, Takashi Iwai wrote: >> >> > At Tue, 18 Feb 2014 11:04:19 -0700, >> >> > Stephen Warren wrote: >> >> >> >> >> >> On 02/15/2014 02:22 AM, Takashi Iwai wrote: >> >> >> > At Sat, 15 Feb 2014 10:17:33 +0100, >> >> >> > Takashi Iwai wrote: >> >> >> >> >> >> >> >> The default parent device can be obtained directly via card object, so >> >> >> >> we don't need to rely on pci->dev.parent. Since there is no access to >> >> >> >> pci_dev, we can reduce the inclusion of linux/pci.h, too. >> >> >> >> >> >> >> >> Signed-off-by: Takashi Iwai >> >> >> > >> >> >> > I forgot the cover page: these tree patches are trivial cleanups of >> >> >> > hda-codec drivers (not the controller) to work without PCI device >> >> >> > assignment. The idea was triggered by Dylan's question. >> >> >> >> >> >> The series seems fine to me, so briefly, >> >> >> Reviewed-by: Stephen Warren >> >> > >> >> > Thanks. Any chance to work on / submit other changes for Tegra >> >> > HD-audio support? >> >> >> >> That's the plan, hopefully I'll be able to find time to throw together >> >> an RFC by the end of the week. >> > >> > Since there was no patch appearing yet, I merged my latest development >> > branch to for-next branch, which includes lots of changes in >> > hda_intel.c and hda_codec.c. If any, please rebase your patches to >> > it. >> >> Thanks for the heads up. I've got a series that is almost ready, I'm >> still trying to tease part of the build out from under CONFIG_PCI in >> the hda makefile. > > I don't think we have a dependency on CONFIG_PCI in Makefile. Kconfig > has a dependency, but it can be easily reduced by a patch like below. Sounds good. I was looking at re-using some of the config options (HDMI codec and power save) for the platform driver as well. Maybe something like the following. SND_HDA would build the helper module and hda-codec that are used by both hda_intel and a platform driver. > > Of course, it'd be better to move the whole hda directory out of pci, > but we can do it later at any time once via git. I can add that to the end of the series or it can move it whenever is convenient, not sure how many pending patch sets it would disrupt. Thanks! Dylan > >> I'll try to button that up and get a the whole lot >> rebased on top of the for-next branch. > > Thanks! > > > Takashi > > --- > diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig > index 8756c8e32922..56d93bf45025 100644 > --- a/sound/pci/Kconfig > +++ b/sound/pci/Kconfig > @@ -578,8 +578,6 @@ config SND_FM801_TEA575X_BOOL > FM801 chip with a TEA5757 tuner (MediaForte SF256-PCS, SF256-PCP and > SF64-PCR) into the snd-fm801 driver. > > -source "sound/pci/hda/Kconfig" > - > config SND_HDSP > tristate "RME Hammerfall DSP Audio" > select FW_LOADER > @@ -889,3 +887,5 @@ config SND_YMFPCI > will be called snd-ymfpci. > > endif # SND_PCI > + > +source "sound/pci/hda/Kconfig" > diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig > index f2032dd7e35e..6fc769da6949 100644 > --- a/sound/pci/hda/Kconfig > +++ b/sound/pci/hda/Kconfig > @@ -1,5 +1,6 @@ > menuconfig SND_HDA_INTEL > tristate "Intel HD Audio" > + depends on (PCI || SOMETHING_YOU_WANT) > select SND_PCM > select SND_VMASTER > select SND_KCTL_JACK diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 8756c8e..56d93bf 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig @@ -578,8 +578,6 @@ config SND_FM801_TEA575X_BOOL FM801 chip with a TEA5757 tuner (MediaForte SF256-PCS, SF256-PCP and SF64-PCR) into the snd-fm801 driver. -source "sound/pci/hda/Kconfig" - config SND_HDSP tristate "RME Hammerfall DSP Audio" select FW_LOADER @@ -889,3 +887,5 @@ config SND_YMFPCI will be called snd-ymfpci. endif # SND_PCI + +source "sound/pci/hda/Kconfig" diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig index 0e53634..d983d24 100644 --- a/sound/pci/hda/Kconfig +++ b/sound/pci/hda/Kconfig @@ -1,5 +1,5 @@ -menuconfig SND_HDA_INTEL - tristate "Intel HD Audio" +menuconfig SND_HDA + tristate "HD Audio" select SND_PCM select SND_VMASTER select SND_KCTL_JACK @@ -10,9 +10,55 @@ menuconfig SND_HDA_INTEL This option enables the HD-audio controller. Don't forget to choose the appropriate codec options below. +config SND_HDA_INTEL + tristate "Intel HD Audio" + depends on SND_PCI + select SND_HDA + help + Say Y here to support standard PC HDA over PCI + + This options enables support for HD Audio via PCI present on + most PCs. + To compile this driver as a module, choose M here: the module will be called snd-hda-intel. +config SND_HDA_TEGRA + tristate "Tegra HD Audio" + select SND_HDA + help + Say Y here to support the HDA controller present in Nvidia + Tegra SoCs + + This options enables support for the HD Audio controller + present in some Nvidia Tegra SoCs, used to communicate audio + to the HDMI output. + + To compile this driver as a module, choose M here: the module + will be called snd-hda-tegra. + +if SND_HDA_INTEL || SND_HDA_TEGRA + +config SND_HDA_CODEC_HDMI + tristate "Build HDMI/DisplayPort HD-audio codec support" + help + Say Y or M here to include HDMI and DisplayPort HD-audio codec + support in snd-hda-intel or tegra driver. This includes all + AMD/ATI, Intel and Nvidia HDMI/DisplayPort codecs. + +comment "Set to Y if you want auto-loading the codec driver" + depends on SND_HDA_INTEL=y && SND_HDA_CODEC_HDMI=m + +config SND_HDA_POWER_SAVE_DEFAULT + int "Default time-out for HD-audio power-save mode" + depends on PM + default 0 + help + The default time-out value in seconds for HD-audio automatic + power-save mode. 0 means to disable the power-save mode. + +endif + if SND_HDA_INTEL config SND_HDA_DSP_LOADER @@ -126,16 +172,6 @@ config SND_HDA_CODEC_VIA comment "Set to Y if you want auto-loading the codec driver" depends on SND_HDA_INTEL=y && SND_HDA_CODEC_VIA=m -config SND_HDA_CODEC_HDMI - tristate "Build HDMI/DisplayPort HD-audio codec support" - help - Say Y or M here to include HDMI and DisplayPort HD-audio codec - support in snd-hda-intel driver. This includes all AMD/ATI, - Intel and Nvidia HDMI/DisplayPort codecs. - -comment "Set to Y if you want auto-loading the codec driver" - depends on SND_HDA_INTEL=y && SND_HDA_CODEC_HDMI=m - config SND_HDA_I915 bool default y @@ -220,12 +256,4 @@ config SND_HDA_GENERIC comment "Set to Y if you want auto-loading the codec driver" depends on SND_HDA_INTEL=y && SND_HDA_GENERIC=m -config SND_HDA_POWER_SAVE_DEFAULT - int "Default time-out for HD-audio power-save mode" - depends on PM - default 0 - help - The default time-out value in seconds for HD-audio automatic - power-save mode. 0 means to disable the power-save mode. - endif diff --git a/sound/pci/hda/Makefile b/sound/pci/hda/Makefile index c5fa8e7..a964b6e 100644 --- a/sound/pci/hda/Makefile +++ b/sound/pci/hda/Makefile @@ -1,4 +1,6 @@ -snd-hda-intel-objs := hda_shared.o hda_intel.o +snd-hda-intel-objs := hda_intel.o +snd-hda-shared-objs := hda_shared.o +snd-hda-tegra-objs := hda_tegra.o # for haswell power well snd-hda-intel-$(CONFIG_SND_HDA_I915) += hda_i915.o @@ -25,7 +27,8 @@ snd-hda-codec-via-objs := patch_via.o snd-hda-codec-hdmi-objs := patch_hdmi.o hda_eld.o # common driver -obj-$(CONFIG_SND_HDA_INTEL) := snd-hda-codec.o +obj-$(CONFIG_SND_HDA) := snd-hda-codec.o +obj-$(CONFIG_SND_HDA) += snd-hda-shared.o # codec drivers obj-$(CONFIG_SND_HDA_GENERIC) += snd-hda-codec-generic.o @@ -45,3 +48,4 @@ obj-$(CONFIG_SND_HDA_CODEC_HDMI) += snd-hda-codec-hdmi.o # otherwise the codec patches won't be hooked before the PCI probe # when built in kernel obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-intel.o +obj-$(CONFIG_SND_HDA_TEGRA) += snd-hda-tegra.o