2023-12-21 10:15:40

by Shenghao Ding

[permalink] [raw]
Subject: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563 from yaml

Remove tas2563 from tas2562, it will be supported in tas2781 to better
support dsp mode.

Signed-off-by: Shenghao Ding <[email protected]>

---
Change in v2:
- remove tas2563, which will be move to tas2781 driver
---
Documentation/devicetree/bindings/sound/tas2562.yaml | 2 --
1 file changed, 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/tas2562.yaml b/Documentation/devicetree/bindings/sound/tas2562.yaml
index f01c0dde0cf7..d28c102c0ce7 100644
--- a/Documentation/devicetree/bindings/sound/tas2562.yaml
+++ b/Documentation/devicetree/bindings/sound/tas2562.yaml
@@ -18,7 +18,6 @@ description: |

Specifications about the audio amplifier can be found at:
https://www.ti.com/lit/gpn/tas2562
- https://www.ti.com/lit/gpn/tas2563
https://www.ti.com/lit/gpn/tas2564
https://www.ti.com/lit/gpn/tas2110

@@ -29,7 +28,6 @@ properties:
compatible:
enum:
- ti,tas2562
- - ti,tas2563
- ti,tas2564
- ti,tas2110

--
2.34.1



2023-12-21 10:19:38

by Shenghao Ding

[permalink] [raw]
Subject: [PATCH v2 3/5] ASoC: tas2781: Add tas2563 into header file for dsp mode

Support dsp mode for tas2563.

Signed-off-by: Shenghao Ding <[email protected]>

---
Change in v2:
- Move tas2563 to tas2781 driver
---
include/sound/tas2781.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index a6c808b22318..45be543110ac 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -1,13 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0 */
//
-// ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier
+// ALSA SoC Texas Instruments TAS2781/TAS2563 Audio Smart Amplifier
//
// Copyright (C) 2022 - 2023 Texas Instruments Incorporated
// https://www.ti.com
//
-// The TAS2781 driver implements a flexible and configurable
+// The TAS2781/TAS2563 driver implements a flexible and configurable
// algo coefficient setting for one, two, or even multiple
-// TAS2781 chips.
+// TAS2781/TAS2563 chips.
//
// Author: Shenghao Ding <[email protected]>
// Author: Kevin Lu <[email protected]>
@@ -60,6 +60,7 @@

enum audio_device {
TAS2781 = 0,
+ TAS2563
};

enum device_catlog_id {
--
2.34.1


2023-12-21 10:19:54

by Shenghao Ding

[permalink] [raw]
Subject: [PATCH v2 4/5] ASoC: tas2781: Add tas2563 into driver

Add tas2563 to better support dsp mode.

Signed-off-by: Shenghao Ding <[email protected]>

---
Change in v2:
- Move tas2563 to tas2781 driver
---
sound/soc/codecs/tas2781-i2c.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index 55cd5e3c23a5..c6afc87f2c69 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -5,9 +5,9 @@
// Copyright (C) 2022 - 2023 Texas Instruments Incorporated
// https://www.ti.com
//
-// The TAS2781 driver implements a flexible and configurable
+// The TAS2781/TAS2563 driver implements a flexible and configurable
// algo coefficient setting for one, two, or even multiple
-// TAS2781 chips.
+// TAS2781/TAS2563 chips.
//
// Author: Shenghao Ding <[email protected]>
// Author: Kevin Lu <[email protected]>
@@ -33,6 +33,7 @@

static const struct i2c_device_id tasdevice_id[] = {
{ "tas2781", TAS2781 },
+ { "tas2563", TAS2563 },
{}
};
MODULE_DEVICE_TABLE(i2c, tasdevice_id);
@@ -40,6 +41,7 @@ MODULE_DEVICE_TABLE(i2c, tasdevice_id);
#ifdef CONFIG_OF
static const struct of_device_id tasdevice_of_match[] = {
{ .compatible = "ti,tas2781" },
+ { .compatible = "ti,tas2563" },
{},
};
MODULE_DEVICE_TABLE(of, tasdevice_of_match);
--
2.34.1


2023-12-21 15:50:52

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563 from yaml

On Thu, Dec 21, 2023 at 06:13:41PM +0800, Shenghao Ding wrote:
> Remove tas2563 from tas2562, it will be supported in tas2781 to better
> support dsp mode.

DSP

Shouldn't this patch go after the actual change happen?
I don't know the answer myself, I would like to hear DT
people on this.


--
With Best Regards,
Andy Shevchenko



2023-12-21 15:53:59

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 3/5] ASoC: tas2781: Add tas2563 into header file for dsp mode

On Thu, Dec 21, 2023 at 06:13:43PM +0800, Shenghao Ding wrote:
> Support dsp mode for tas2563.

DSP

...

> +// ALSA SoC Texas Instruments TAS2781/TAS2563 Audio Smart Amplifier

Why not ordered?

...

> +// The TAS2781/TAS2563 driver implements a flexible and configurable

Ditto.

...

> +// TAS2781/TAS2563 chips.

Ditto.

...

> enum audio_device {
> TAS2781 = 0,
> + TAS2563

Missing comma as this is not a terminator.

> };

Ditto.

...

I would expect here

enum audio_device {
TAS2563,
TAS2781,
};

--
With Best Regards,
Andy Shevchenko



2023-12-21 15:54:58

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 4/5] ASoC: tas2781: Add tas2563 into driver

On Thu, Dec 21, 2023 at 06:13:44PM +0800, Shenghao Ding wrote:
> Add tas2563 to better support dsp mode.

DSP

...

> +// The TAS2781/TAS2563 driver implements a flexible and configurable

Ordered?

...

> +// TAS2781/TAS2563 chips.

Ditto.

...

> static const struct i2c_device_id tasdevice_id[] = {
> { "tas2781", TAS2781 },
> + { "tas2563", TAS2563 },

Ditto

> {}
> };

...

> static const struct of_device_id tasdevice_of_match[] = {
> { .compatible = "ti,tas2781" },
> + { .compatible = "ti,tas2563" },

Ditto.

> {},
> };

--
With Best Regards,
Andy Shevchenko



2023-12-21 17:31:21

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563 from yaml

On 21/12/2023 11:13, Shenghao Ding wrote:
> Remove tas2563 from tas2562, it will be supported in tas2781 to better
> support dsp mode.

Please provide rationale in terms of bindings and hardware, not in terms
of driver. Or at least not only. For example "supported in tas2781" does
not fit hardware part, so you sure must be talking about drivers thus
why driver change would affect bindings?



Best regards,
Krzysztof


2023-12-21 17:31:46

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563 from yaml

On 21/12/2023 16:50, Andy Shevchenko wrote:
> On Thu, Dec 21, 2023 at 06:13:41PM +0800, Shenghao Ding wrote:
>> Remove tas2563 from tas2562, it will be supported in tas2781 to better
>> support dsp mode.
>
> DSP
>
> Shouldn't this patch go after the actual change happen?

I would squash both, so device documentation does not disappear.

Best regards,
Krzysztof


2023-12-23 11:49:50

by Shenghao Ding

[permalink] [raw]
Subject: RE: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563 from yaml



> -----Original Message-----
> From: Andy Shevchenko <[email protected]>
> Sent: Thursday, December 21, 2023 11:51 PM
> To: Ding, Shenghao <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]; Lu, Kevin <kevin-
> [email protected]>; Xu, Baojun <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; [email protected];
> [email protected]; Gupta, Peeyush <[email protected]>; Navada Kanyana,
> Mukund <[email protected]>
> Subject: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563
> from yaml
>
> On Thu, Dec 21, 2023 at 06:13:41PM +0800, Shenghao Ding wrote:
> > Remove tas2563 from tas2562, it will be supported in tas2781 to better
> > support dsp mode.
>
> DSP
>
> Shouldn't this patch go after the actual change happen?
> I don't know the answer myself, I would like to hear DT people on this.
>
tas2781 driver can be reused as tas2563 driver, except for the DSP firmware file,
and both DSP firmware files complied with TI SmartAMP DSP spec 3.0.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>


2023-12-27 07:05:37

by Shenghao Ding

[permalink] [raw]
Subject: RE: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563 from yaml



> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Friday, December 22, 2023 1:32 AM
> To: Andy Shevchenko <[email protected]>; Ding, Shenghao
> <[email protected]>
> Cc: [email protected]; [email protected]; [email protected]; Lu,
> Kevin <[email protected]>; Xu, Baojun <[email protected]>;
> [email protected]; [email protected]; [email protected]; pierre-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]; Gupta, Peeyush
> <[email protected]>; Navada Kanyana, Mukund <[email protected]>
> Subject: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563
> from yaml
>
> On 21/12/2023 16:50, Andy Shevchenko wrote:
> > On Thu, Dec 21, 2023 at 06:13:41PM +0800, Shenghao Ding wrote:
> >> Remove tas2563 from tas2562, it will be supported in tas2781 to
> >> better support dsp mode.
> >
> > DSP
> >
> > Shouldn't this patch go after the actual change happen?
>
> I would squash both, so device documentation does not disappear.
I do not fully understand "squash both", do you mean still to keep ti,tas2563 in tas2562.yaml?
>
> Best regards,
> Krzysztof

2023-12-27 07:08:43

by Shenghao Ding

[permalink] [raw]
Subject: RE: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563 from yaml



> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Friday, December 22, 2023 1:31 AM
> To: Ding, Shenghao <[email protected]>; [email protected];
> [email protected]
> Cc: [email protected]; [email protected]; Lu, Kevin
> <[email protected]>; Xu, Baojun <[email protected]>;
> [email protected]; [email protected]; [email protected]; pierre-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]; Gupta, Peeyush
> <[email protected]>; Navada Kanyana, Mukund <[email protected]>
> Subject: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563
> from yaml
>
> On 21/12/2023 11:13, Shenghao Ding wrote:
> > Remove tas2563 from tas2562, it will be supported in tas2781 to better
> > support dsp mode.
>
> Please provide rationale in terms of bindings and hardware, not in terms of
> driver. Or at least not only. For example "supported in tas2781" does not fit
> hardware part, so you sure must be talking about drivers thus why driver
> change would affect bindings?
This patch mainly change the binding, not the driver code. Tas2563 is unbound
to tas2562 driver, and bound to tas2781 driver.
>
>
>
> Best regards,
> Krzysztof

2023-12-27 10:56:08

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563 from yaml

On 27/12/2023 08:04, Ding, Shenghao wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <[email protected]>
>> Sent: Friday, December 22, 2023 1:32 AM
>> To: Andy Shevchenko <[email protected]>; Ding, Shenghao
>> <[email protected]>
>> Cc: [email protected]; [email protected]; [email protected]; Lu,
>> Kevin <[email protected]>; Xu, Baojun <[email protected]>;
>> [email protected]; [email protected]; [email protected]; pierre-
>> [email protected]; [email protected]; linux-
>> [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected]; Gupta, Peeyush
>> <[email protected]>; Navada Kanyana, Mukund <[email protected]>
>> Subject: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563
>> from yaml
>>
>> On 21/12/2023 16:50, Andy Shevchenko wrote:
>>> On Thu, Dec 21, 2023 at 06:13:41PM +0800, Shenghao Ding wrote:
>>>> Remove tas2563 from tas2562, it will be supported in tas2781 to
>>>> better support dsp mode.
>>>
>>> DSP
>>>
>>> Shouldn't this patch go after the actual change happen?
>>
>> I would squash both, so device documentation does not disappear.
> I do not fully understand "squash both", do you mean still to keep ti,tas2563 in tas2562.yaml?

I meant to squash both binding patches (git help rebase).

Best regards,
Krzysztof


2023-12-27 10:56:38

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563 from yaml

On 27/12/2023 08:07, Ding, Shenghao wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <[email protected]>
>> Sent: Friday, December 22, 2023 1:31 AM
>> To: Ding, Shenghao <[email protected]>; [email protected];
>> [email protected]
>> Cc: [email protected]; [email protected]; Lu, Kevin
>> <[email protected]>; Xu, Baojun <[email protected]>;
>> [email protected]; [email protected]; [email protected]; pierre-
>> [email protected]; [email protected]; linux-
>> [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected]; Gupta, Peeyush
>> <[email protected]>; Navada Kanyana, Mukund <[email protected]>
>> Subject: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563
>> from yaml
>>
>> On 21/12/2023 11:13, Shenghao Ding wrote:
>>> Remove tas2563 from tas2562, it will be supported in tas2781 to better
>>> support dsp mode.
>>
>> Please provide rationale in terms of bindings and hardware, not in terms of
>> driver. Or at least not only. For example "supported in tas2781" does not fit
>> hardware part, so you sure must be talking about drivers thus why driver
>> change would affect bindings?
> This patch mainly change the binding, not the driver code. Tas2563 is unbound
> to tas2562 driver, and bound to tas2781 driver.

Then why do you reference driver "tas2781" here?

Best regards,
Krzysztof


2023-12-27 13:46:10

by Shenghao Ding

[permalink] [raw]
Subject: RE: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove tas2563 from yaml



> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: Wednesday, December 27, 2023 6:56 PM
> To: Ding, Shenghao <[email protected]>
> Cc: [email protected]; [email protected]; Lu, Kevin
> <[email protected]>; Xu, Baojun <[email protected]>;
> [email protected]; [email protected]; [email protected]; pierre-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]; Gupta, Peeyush
> <[email protected]>; Navada Kanyana, Mukund <[email protected]>;
> [email protected]; [email protected]
> Subject: Re: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove
> tas2563 from yaml
>
> On 27/12/2023 08:07, Ding, Shenghao wrote:
> >
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <[email protected]>
> >> Sent: Friday, December 22, 2023 1:31 AM
> >> To: Ding, Shenghao <[email protected]>; [email protected];
> >> [email protected]
> >> Cc: [email protected]; [email protected]; Lu, Kevin
> >> <[email protected]>; Xu, Baojun <[email protected]>;
> >> [email protected]; [email protected]; [email protected];
> >> pierre- [email protected]; [email protected]; linux-
> >> [email protected]; [email protected];
> >> [email protected]; [email protected]; [email protected]; Gupta,
> >> Peeyush <[email protected]>; Navada Kanyana, Mukund <[email protected]>
> >> Subject: [EXTERNAL] Re: [PATCH v2 1/5] ASoC: dt-bindings: remove
> >> tas2563 from yaml
> >>
> >> On 21/12/2023 11:13, Shenghao Ding wrote:
> >>> Remove tas2563 from tas2562, it will be supported in tas2781 to
> >>> better support dsp mode.
> >>
> >> Please provide rationale in terms of bindings and hardware, not in
> >> terms of driver. Or at least not only. For example "supported in
> >> tas2781" does not fit hardware part, so you sure must be talking
> >> about drivers thus why driver change would affect bindings?
> > This patch mainly change the binding, not the driver code. Tas2563 is
> > unbound to tas2562 driver, and bound to tas2781 driver.
>
> Then why do you reference driver "tas2781" here?
Both tas2563 and tas2781 are dsp-inside audio amplifier,
tas2781 driver is designed for dsp-inside series chips,
not only for tas2781.
>
> Best regards,
> Krzysztof