Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1411282 > unrolled thread

Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219

Started byRob Herring <robh@kernel.org>
First post2016-06-01 16:50 +0200
Last post2016-06-07 17:00 +0200
Articles 11 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3] ASoC: rockchip: Add machine driver for  MAX98357A/RT5514/DA7219 Rob Herring <robh@kernel.org> - 2016-06-01 16:50 +0200
    Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219 Xing Zheng <zhengxing@rock-chips.com> - 2016-06-03 16:20 +0200
      Re: [PATCH v3] ASoC: rockchip: Add machine driver for  MAX98357A/RT5514/DA7219 Mark Brown <broonie@kernel.org> - 2016-06-07 02:00 +0200
        Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219 Xing Zheng <zhengxing@rock-chips.com> - 2016-06-07 05:00 +0200
          Re: [PATCH v3] ASoC: rockchip: Add machine driver for  MAX98357A/RT5514/DA7219 Mark Brown <broonie@kernel.org> - 2016-06-07 12:50 +0200
            Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219 Xing Zheng <zhengxing@rock-chips.com> - 2016-06-07 13:40 +0200
              Re: [PATCH v3] ASoC: rockchip: Add machine driver for  MAX98357A/RT5514/DA7219 Mark Brown <broonie@kernel.org> - 2016-06-07 14:10 +0200
                Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219 Xing Zheng <zhengxing@rock-chips.com> - 2016-06-07 14:50 +0200
                  Re: [PATCH v3] ASoC: rockchip: Add machine driver for  MAX98357A/RT5514/DA7219 Mark Brown <broonie@kernel.org> - 2016-06-07 15:40 +0200
                    Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219 Xing Zheng <zhengxing@rock-chips.com> - 2016-06-07 15:50 +0200
                      Re: [PATCH v3] ASoC: rockchip: Add machine driver for  MAX98357A/RT5514/DA7219 Mark Brown <broonie@kernel.org> - 2016-06-07 17:00 +0200

#1411282 — Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219

FromRob Herring <robh@kernel.org>
Date2016-06-01 16:50 +0200
SubjectRe: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219
Message-ID<rFfD3-1b3-1@gated-at.bofh.it>
On Thu, May 26, 2016 at 09:02:22PM +0800, Xing Zheng wrote:
> There are multi codec devices on the RK3399 platform, we can use
> this patch support and control these codecs.
> 
> Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
> ---
> 
> Changes in v3:
> - rename DOC to rockchip,rk3399-max98357a-rt5514-da7219.txt
> - rename compatible to rockchip,rk3399-max98357a-rt5514-da7219
> - rename source code to rk3399_max98357a_rt5514_da7219.c
> 
> Changes in v2:
> - use the FS 256 to set mclks of the max98357a and rt5514 danamically
> - add more sample rate for da7219
> 
>  .../rockchip,rk3399-max98357a-rt5514-da7219.txt    |   15 +
>  sound/soc/rockchip/Kconfig                         |   11 +
>  sound/soc/rockchip/Makefile                        |    2 +
>  .../soc/rockchip/rk3399_max98357a_rt5514_da7219.c  |  333 ++++++++++++++++++++
>  4 files changed, 361 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3399-max98357a-rt5514-da7219.txt
>  create mode 100644 sound/soc/rockchip/rk3399_max98357a_rt5514_da7219.c
> 
> diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3399-max98357a-rt5514-da7219.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3399-max98357a-rt5514-da7219.txt
> new file mode 100644
> index 0000000..3ae603e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/rockchip,rk3399-max98357a-rt5514-da7219.txt
> @@ -0,0 +1,15 @@
> +ROCKCHIP with MAX98357A/RT5514/DA7219 codecs
> +
> +Required properties:
> +- compatible: "rockchip,rk3399-max98357a-rt5514-da7219"

I'm still not very clear on the naming convention thoughout this. This 
doesn't seem like a pattern we want to repeat (<chip>-<codec>-<codec>).

Rob

[toc] | [next] | [standalone]


#1413266 — Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219

FromXing Zheng <zhengxing@rock-chips.com>
Date2016-06-03 16:20 +0200
SubjectRe: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219
Message-ID<rFY78-4c8-13@gated-at.bofh.it>
In reply to#1411282
Hi Rob,

On 2016年06月01日 22:45, Rob Herring wrote:
> On Thu, May 26, 2016 at 09:02:22PM +0800, Xing Zheng wrote:
>> There are multi codec devices on the RK3399 platform, we can use
>> this patch support and control these codecs.
>>
>> Signed-off-by: Xing Zheng<zhengxing@rock-chips.com>
>> ---
>>
>> Changes in v3:
>> - rename DOC to rockchip,rk3399-max98357a-rt5514-da7219.txt
>> - rename compatible to rockchip,rk3399-max98357a-rt5514-da7219
>> - rename source code to rk3399_max98357a_rt5514_da7219.c
>>
>> Changes in v2:
>> - use the FS 256 to set mclks of the max98357a and rt5514 danamically
>> - add more sample rate for da7219
>>
>>   .../rockchip,rk3399-max98357a-rt5514-da7219.txt    |   15 +
>>   sound/soc/rockchip/Kconfig                         |   11 +
>>   sound/soc/rockchip/Makefile                        |    2 +
>>   .../soc/rockchip/rk3399_max98357a_rt5514_da7219.c  |  333 ++++++++++++++++++++
>>   4 files changed, 361 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3399-max98357a-rt5514-da7219.txt
>>   create mode 100644 sound/soc/rockchip/rk3399_max98357a_rt5514_da7219.c
>>
>> diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3399-max98357a-rt5514-da7219.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3399-max98357a-rt5514-da7219.txt
>> new file mode 100644
>> index 0000000..3ae603e
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/sound/rockchip,rk3399-max98357a-rt5514-da7219.txt
>> @@ -0,0 +1,15 @@
>> +ROCKCHIP with MAX98357A/RT5514/DA7219 codecs
>> +
>> +Required properties:
>> +- compatible: "rockchip,rk3399-max98357a-rt5514-da7219"
> I'm still not very clear on the naming convention thoughout this. This
> doesn't seem like a pattern we want to repeat (<chip>-<codec>-<codec>).
>
Thank you for your reply. :-)

I refered to MTK's mt8173-rt5650-rt5514.txt on upstream, that compatible 
name is "mediatek,mt8173-rt5650-rt5514".
Because our platform need to support 3 codecs (max98357a / da7219 / 
rt5514). Perhaps, you maybe feel that name is too long? And, could you 
please tell me what names would be better?

For example: "rk3399-composite-codecs" ?

Thanks.


-- 
- Xing Zheng

[toc] | [prev] | [next] | [standalone]


#1415589

FromMark Brown <broonie@kernel.org>
Date2016-06-07 02:00 +0200
Message-ID<rHcB4-3jH-9@gated-at.bofh.it>
In reply to#1413266

[Multipart message — attachments visible in raw view] — view raw

On Fri, Jun 03, 2016 at 10:16:12PM +0800, Xing Zheng wrote:

> I refered to MTK's mt8173-rt5650-rt5514.txt on upstream, that compatible
> name is "mediatek,mt8173-rt5650-rt5514".
> Because our platform need to support 3 codecs (max98357a / da7219 / rt5514).
> Perhaps, you maybe feel that name is too long? And, could you please tell me
> what names would be better?

> For example: "rk3399-composite-codecs" ?

It should probably be three compatibles, one per CODEC, if the driver
needs to handle each separately.

[toc] | [prev] | [next] | [standalone]


#1415646 — Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219

FromXing Zheng <zhengxing@rock-chips.com>
Date2016-06-07 05:00 +0200
SubjectRe: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219
Message-ID<rHfpf-5dv-1@gated-at.bofh.it>
In reply to#1415589
Hi Mark,

On 2016年06月07日 07:50, Mark Brown wrote:
> On Fri, Jun 03, 2016 at 10:16:12PM +0800, Xing Zheng wrote:
>
>> I refered to MTK's mt8173-rt5650-rt5514.txt on upstream, that compatible
>> name is "mediatek,mt8173-rt5650-rt5514".
>> Because our platform need to support 3 codecs (max98357a / da7219 / rt5514).
>> Perhaps, you maybe feel that name is too long? And, could you please tell me
>> what names would be better?
>> For example: "rk3399-composite-codecs" ?
> It should probably be three compatibles, one per CODEC, if the driver
> needs to handle each separately.
Do you mean like this:
--------
sound {
compatible = "rockchip,rk3399-max98357a-rt5514-da7219";

dailink-0 {
compatible = "rockchip,rk3399-max98357a";
rockchip,cpu = <&i2s0>;
rockchip,codec = <&max98357a>;
};

dailink-1 {
compatible = "rockchip,rk3399-rt5514";
rockchip,cpu = <&i2s0>;
rockchip,codec = <&headsetcodec>;
};

dailink-2 {
compatible = "rockchip,rk3399-da7219";
rockchip,cpu = <&i2s0>;
rockchip,codec = <&codec>;
};
};
--------
Above, the machine drvier will handle them. Please correct me if I 
misunderstand.

Thanks.

-- 
- Xing Zheng

[toc] | [prev] | [next] | [standalone]


#1415980

FromMark Brown <broonie@kernel.org>
Date2016-06-07 12:50 +0200
Message-ID<rHmK6-1z7-29@gated-at.bofh.it>
In reply to#1415646

[Multipart message — attachments visible in raw view] — view raw

On Tue, Jun 07, 2016 at 10:49:35AM +0800, Xing Zheng wrote:
> On 2016年06月07日 07:50, Mark Brown wrote:

> > It should probably be three compatibles, one per CODEC, if the driver
> > needs to handle each separately.

> Do you mean like this:
> --------
> sound {
> compatible = "rockchip,rk3399-max98357a-rt5514-da7219";
> 
> dailink-0 {
> compatible = "rockchip,rk3399-max98357a";
> rockchip,cpu = <&i2s0>;
> rockchip,codec = <&max98357a>;
> };
> 
> dailink-1 {
> compatible = "rockchip,rk3399-rt5514";
> rockchip,cpu = <&i2s0>;
> rockchip,codec = <&headsetcodec>;
> };
> 
> dailink-2 {
> compatible = "rockchip,rk3399-da7219";
> rockchip,cpu = <&i2s0>;
> rockchip,codec = <&codec>;
> };
> };
> --------
> Above, the machine drvier will handle them. Please correct me if I
> misunderstand.

No, that'd be one card with all three CODECs on the same board which I'm
guessing isn't the intention?

[toc] | [prev] | [next] | [standalone]


#1416051 — Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219

FromXing Zheng <zhengxing@rock-chips.com>
Date2016-06-07 13:40 +0200
SubjectRe: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219
Message-ID<rHnwt-25S-1@gated-at.bofh.it>
In reply to#1415980
Hi Mark,

On 2016年06月07日 18:47, Mark Brown wrote:
> On Tue, Jun 07, 2016 at 10:49:35AM +0800, Xing Zheng wrote:
>> On 2016年06月07日 07:50, Mark Brown wrote:
>>> It should probably be three compatibles, one per CODEC, if the driver
>>> needs to handle each separately.
>> Do you mean like this:
>> --------
>> sound {
>> compatible = "rockchip,rk3399-max98357a-rt5514-da7219";
>>
>> dailink-0 {
>> compatible = "rockchip,rk3399-max98357a";
>> rockchip,cpu =<&i2s0>;
>> rockchip,codec =<&max98357a>;
>> };
>>
>> dailink-1 {
>> compatible = "rockchip,rk3399-rt5514";
>> rockchip,cpu =<&i2s0>;
>> rockchip,codec =<&headsetcodec>;
>> };
>>
>> dailink-2 {
>> compatible = "rockchip,rk3399-da7219";
>> rockchip,cpu =<&i2s0>;
>> rockchip,codec =<&codec>;
>> };
>> };
>> --------
>> Above, the machine drvier will handle them. Please correct me if I
>> misunderstand.
> No, that'd be one card with all three CODECs on the same board which I'm
> guessing isn't the intention?
Yes, because on our board, the audio connection by hardware really is such:
                   |-- max98357a
i2s0 <==> |-- rt5514
                   | -- da7219

We do need to support max98357a / rt5514 / da7219 via i2s0 on the same 
board for RK3399.

I remember that it will be failed if we register card with i2s0 more 
times. Therefore, I chose this mothod that create 3 dai-links on one 
machine driver.

Thanks.

-- 
- Xing Zheng

[toc] | [prev] | [next] | [standalone]


#1416099

FromMark Brown <broonie@kernel.org>
Date2016-06-07 14:10 +0200
Message-ID<rHnZv-2wN-13@gated-at.bofh.it>
In reply to#1416051

[Multipart message — attachments visible in raw view] — view raw

On Tue, Jun 07, 2016 at 07:38:23PM +0800, Xing Zheng wrote:
> On 2016年06月07日 18:47, Mark Brown wrote:

> > No, that'd be one card with all three CODECs on the same board which I'm
> > guessing isn't the intention?

> Yes, because on our board, the audio connection by hardware really is such:
>                   |-- max98357a
> i2s0 <==> |-- rt5514
>                   | -- da7219

> We do need to support max98357a / rt5514 / da7219 via i2s0 on the same board
> for RK3399.

> I remember that it will be failed if we register card with i2s0 more times.
> Therefore, I chose this mothod that create 3 dai-links on one machine
> driver.

OK, then the original name probably makes some sense though really
that's such an unusual design that just naming it after the specific
board might be better, it's not likely to see any reuse I'd guess.

[toc] | [prev] | [next] | [standalone]


#1416133 — Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219

FromXing Zheng <zhengxing@rock-chips.com>
Date2016-06-07 14:50 +0200
SubjectRe: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219
Message-ID<rHoCe-2KD-13@gated-at.bofh.it>
In reply to#1416099
Hi Mark,

On 2016年06月07日 20:06, Mark Brown wrote:
> OK, then the original name probably makes some sense though really
> that's such an unusual design that just naming it after the specific
> board might be better, it's not likely to see any reuse I'd guess.
There are not only one type of board with this audio connection, so I 
think we don't need to add specific board name.

Therefore, I intend to recover original name 
(rk3399_max98357a_rt5514_da7219.c), and description like this:
sound {
     compatible = "rockchip,rk3399-max98357a-rt5514-da7219";
     rockchip,cpu = <&i2s0 &i2s0 &i2s0>;               // note (will not 
be sent to upstream): In future, we may use the i2s1 or i2s2...
     rockchip,codec = <&max98357a &headsetcodec &codec>;
};

Could you please agree to do this?

Thanks.

-- 
- Xing Zheng

[toc] | [prev] | [next] | [standalone]


#1416185

FromMark Brown <broonie@kernel.org>
Date2016-06-07 15:40 +0200
Message-ID<rHpoC-3hJ-53@gated-at.bofh.it>
In reply to#1416133

[Multipart message — attachments visible in raw view] — view raw

On Tue, Jun 07, 2016 at 08:47:01PM +0800, Xing Zheng wrote:
> On 2016年06月07日 20:06, Mark Brown wrote:

> > OK, then the original name probably makes some sense though really
> > that's such an unusual design that just naming it after the specific
> > board might be better, it's not likely to see any reuse I'd guess.

> There are not only one type of board with this audio connection, so I think
> we don't need to add specific board name.

I imagine they're all variants on a single reference design though?  The
name is unweildy.

[toc] | [prev] | [next] | [standalone]


#1416198 — Re: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219

FromXing Zheng <zhengxing@rock-chips.com>
Date2016-06-07 15:50 +0200
SubjectRe: [PATCH v3] ASoC: rockchip: Add machine driver for MAX98357A/RT5514/DA7219
Message-ID<rHpyh-3ll-13@gated-at.bofh.it>
In reply to#1416185
Hi Mark,

On 2016年06月07日 21:32, Mark Brown wrote:
> On Tue, Jun 07, 2016 at 08:47:01PM +0800, Xing Zheng wrote:
>> On 2016年06月07日 20:06, Mark Brown wrote:
>>> OK, then the original name probably makes some sense though really
>>> that's such an unusual design that just naming it after the specific
>>> board might be better, it's not likely to see any reuse I'd guess.
>> There are not only one type of board with this audio connection, so I think
>> we don't need to add specific board name.
> I imagine they're all variants on a single reference design though?  The
> name is unweildy.
Yes, they are based on a single reference design which is called gru, so 
could I use the name "rk3399-gru-sound"?

Thanks.

-- 
- Xing Zheng

[toc] | [prev] | [next] | [standalone]


#1416278

FromMark Brown <broonie@kernel.org>
Date2016-06-07 17:00 +0200
Message-ID<rHqE2-3Zy-15@gated-at.bofh.it>
In reply to#1416198

[Multipart message — attachments visible in raw view] — view raw

On Tue, Jun 07, 2016 at 09:48:42PM +0800, Xing Zheng wrote:
> On 2016年06月07日 21:32, Mark Brown wrote:

> > I imagine they're all variants on a single reference design though?  The
> > name is unweildy.

> Yes, they are based on a single reference design which is called gru, so
> could I use the name "rk3399-gru-sound"?

That looks reasonable.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web