From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jose Abreu Subject: Re: [PATCH 2/5 v4] drm/i2c/adv7511: Add audio support Date: Mon, 11 Apr 2016 15:08:39 +0100 Message-ID: <570BAFE7.8040206@synopsys.com> References: <5707D249.5040707@metafoo.de> <5707D88A.3010400@synopsys.com> <57091999.4010906@metafoo.de> <570B6DF2.1080008@synopsys.com> <570B6F7B.2020906@metafoo.de> <570B8B59.7000900@synopsys.com> <570B975C.50702@metafoo.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.60.111]) by alsa0.perex.cz (Postfix) with ESMTP id 6EE0A2604D6 for ; Mon, 11 Apr 2016 16:09:04 +0200 (CEST) In-Reply-To: <570B975C.50702@metafoo.de> 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 To: Lars-Peter Clausen , Jose Abreu , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org Cc: architt@codeaurora.org, airlied@linux.ie, Vineet.Gupta1@synopsys.com, Alexey.Brodkin@synopsys.com, CARLOS.PALMINHA@synopsys.com, lgirdwood@gmail.com, broonie@kernel.org, tiwai@suse.com List-Id: alsa-devel@alsa-project.org Hi Lars, On 11-04-2016 13:23, Lars-Peter Clausen wrote: > On 04/11/2016 01:32 PM, Jose Abreu wrote: >> Hi Lars, >> >> >> On 11-04-2016 10:33, Lars-Peter Clausen wrote: >>> On 04/11/2016 11:27 AM, Jose Abreu wrote: >>>> Hi Lars, >>>> >>>> >>>> On 09-04-2016 16:02, Lars-Peter Clausen wrote: >>>>> On 04/08/2016 06:12 PM, Jose Abreu wrote: >>>>> [...] >>>>>>> [...] >>>>>>>> +- adi,enable-audio: If set the ADV7511 driver will register a codec interface >>>>>>>> + into ALSA SoC. >>>>>>> This is not a description of the hardware. >>>>>> Is this okay: "adi,enable-audio: Set this boolean parameter if ADV7511 >>>>>> transmitter routes audio signals" ? >>>>> I don't think we need this property. There is no problem with registering >>>>> the audio part unconditionally. As long as there is no connection we wont >>>>> create a sound card that is exposed to userspace. >>>>> >>>> This change was suggested by Laurent Pinchart and was introduced in v3. Quoting >>>> Laurent: >>>> "The idea is that enabling support for ADV7511 audio in the kernel isn't coupled >>>> with whether the system includes audio support. It would be confusing, and would >>>> also waste resources, to create a Linux sound device when no sound channel is >>>> routed on the board." >>> I wouldn't care too much about this at this point, the extra amount of >>> resources required for registering the CODEC (but not the sound card) is >>> just a few bytes (sizeof(struct snd_soc_codec)). >>> >>> Nevertheless what we should do is describe the hardware and from this >>> information infer whether there is a audio connection or not and if there is >>> none we might skip registering the CODEC. In my opinion this hardware >>> description should be modeled using of-graph, having a connection between >>> the SoC side and the adv7511 SPDIF or I2S port. >>> >> You mean something like this: >> >> sound_playback: sound_playback { >> compatible = "simple-audio-card"; >> [...] >> simple-audio-card,format = "i2s"; >> [...] >> } >> >> adv7511@xx { >> compatible = "adi,adv7511"; >> [...] >> >> ports { >> [...] >> /* Audio Output */ >> port@x { >> reg = ; >> endpoint { >> remote-endpoint = <&sound_playback>; >> } >> } >> } >> } > Yes, something like that. Not exactly like that, but similar. One of the > core concepts of of-graph is that there is always a description of the > connection from both sides, this way each side can independently figure out > where it is connected. > > Currently there is also zero support of of-graph in ASoC, so a bit of work > is required to get this integrated properly. > I also believe this would be the better option but in the meantime can't I integrate the audio like it is being done in the dw-hdmi driver[1]? In this driver the audio is registered as a sound card and is conditionally built using Kconfig, just like I was doing in the previous versions. I know you said the HDMI audio is still an open issue but it seems that for this case it was accepted. [1] http://lxr.free-electrons.com/source/drivers/gpu/drm/bridge/dw-hdmi-ahb-audio.c Best regards, Jose Miguel Abreu