[alsa-devel] [PATCH v3 6/6] ASoC: zx: add zx296702 hdmi codec

Jun Nie jun.nie at linaro.org
Wed Jun 3 14:40:31 CEST 2015


2015-06-03 19:01 GMT+08:00 Mark Brown <broonie at kernel.org>:
> On Wed, Jun 03, 2015 at 09:47:46AM +0800, Jun Nie wrote:
>> 2015-06-03 2:13 GMT+08:00 Mark Brown <broonie at kernel.org>:
>> > On Mon, Jun 01, 2015 at 09:42:34AM +0800, Jun Nie wrote:
>
>> >> So I need implement dai link in machine audio card driver, while not
>> >> use simple card and device tree initialization. In this way, I surely
>> >> can embed HDMI audio codec in HDMI driver. Is that right?
>
>> > I'm sorry, I don't entirely follow what you're saying here.
>
>> I am guessing you suggest me to implement a ASoC board driver, like
>> sound/soc/omap/omap3pandora.c. I can link HDMI codec with DAI with
>> snd_soc_dai_link structure to avoid specify the connection in dts.
>
> You can do that if you like, but it's also fine to show the link between
> the S/PDIF and HDMI IPs in DT if you like.
>
>> >> I had try to initialize audio all from dts, so need a HDMI codec dt
>> >> node to connect with DAI. However, I cannot find a way to create an
>> >> independent HDMI CODEC dt node because it is brought up from HDMI
>> >> driver. If my above understanding is correct, a machine level DAI link
>> >> shall resolve this issue with dropping simple card and DAI link in
>> >> dts. Thanks for your comments!
>
>> > If the HDMI encoder is simple I'd expect it to be possible to use it
>> > with simple-card.  If it isn't then we can look at why.
>
>> Most of devices is initialized from devicetree if not all on my board.
>> So I need fill CODEC/DAI dt node for imple-card in dts. I experience
>> the difficulty that I cannot create HDMI CODEC dt node. Because HDMI
>> CODEC shall be part of HDMI driver and be brought up with direct call
>> to snd_soc_register_codec in HDMI driver probe function per my
>> understanding. Then I do not have an independent dt node for HDMI
>> CODEC, thus cannot link the CODEC to DAI with dts information. Do you
>> see any chance to connect a DAI to an embedded CODEC of HDMI video
>> device? Thank you!
>
> Are you saying that the HDMI IP doesn't appear in DT at all?  If the
> HDMI IP appears in DT it should be possible to reference it.
Thanks for confirmation. Seems I have much to learn in DT. Will create
a CODEC device in HDMI display driver and feed HDMI device to simple
card as below to have a try. Thanks!
Do you think other patches are OK to merge except the two HDMI patches?

hdmi: hdmi at 0x12340000 {
        compatible = "zte,zx296702-hdmi";
        reg = <0x12340000 0x1000>;
     };

sound {
        compatible = "simple-audio-card";
        simple-audio-card,name = "zx296702_snd";
        simple-audio-card,cpu {
                sound-dai = <&spdif0>;
        };

        simple-audio-card,codec {
                sound-dai = <&hdmi>;
        };
};


More information about the Alsa-devel mailing list