alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: mediatek: mt8183-da7219: support machine driver for rt1015p
@ 2020-09-11  2:48 Tzung-Bi Shih
  2020-09-11  2:48 ` [PATCH 1/2] ASoC: dt-bindings: mt8183-da7219: add compatible string for using rt1015p Tzung-Bi Shih
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tzung-Bi Shih @ 2020-09-11  2:48 UTC (permalink / raw)
  To: broonie, robh+dt; +Cc: devicetree, alsa-devel, tzungbi

The series reuses mt8183-da7219-max98357.c for supporting machine
driver with rt1015p speaker amplifier.

The 1st patch adds document for the new proposed compatible string.

The 2nd patch changes the machine driver to support "RT1015P" codec.

Tzung-Bi Shih (2):
  ASoC: dt-bindings: mt8183-da7219: add compatible string for using
    rt1015p
  ASoC: mediatek: mt8183-da7219: support machine driver with rt1015p

 .../bindings/sound/mt8183-da7219-max98357.txt |  1 +
 sound/soc/mediatek/Kconfig                    |  1 +
 .../mediatek/mt8183/mt8183-da7219-max98357.c  | 40 +++++++++++++++++++
 3 files changed, 42 insertions(+)

-- 
2.28.0.526.ge36021eeef-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] ASoC: dt-bindings: mt8183-da7219: add compatible string for using rt1015p
  2020-09-11  2:48 [PATCH 0/2] ASoC: mediatek: mt8183-da7219: support machine driver for rt1015p Tzung-Bi Shih
@ 2020-09-11  2:48 ` Tzung-Bi Shih
  2020-09-11  2:48 ` [PATCH 2/2] ASoC: mediatek: mt8183-da7219: support machine driver with rt1015p Tzung-Bi Shih
  2020-09-14 14:51 ` [PATCH 0/2] ASoC: mediatek: mt8183-da7219: support machine driver for rt1015p Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Tzung-Bi Shih @ 2020-09-11  2:48 UTC (permalink / raw)
  To: broonie, robh+dt; +Cc: devicetree, alsa-devel, tzungbi

Machines with rt1015p should use the compatible string
"mediatek,mt8183_da7219_rt1015p".

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
 .../devicetree/bindings/sound/mt8183-da7219-max98357.txt         | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sound/mt8183-da7219-max98357.txt b/Documentation/devicetree/bindings/sound/mt8183-da7219-max98357.txt
index 6787ce8789dd..f276dfc74b46 100644
--- a/Documentation/devicetree/bindings/sound/mt8183-da7219-max98357.txt
+++ b/Documentation/devicetree/bindings/sound/mt8183-da7219-max98357.txt
@@ -3,6 +3,7 @@ MT8183 with MT6358, DA7219, MAX98357, and RT1015 CODECS
 Required properties:
 - compatible : "mediatek,mt8183_da7219_max98357" for MAX98357A codec
                "mediatek,mt8183_da7219_rt1015" for RT1015 codec
+               "mediatek,mt8183_da7219_rt1015p" for RT1015P codec
 - mediatek,headset-codec: the phandles of da7219 codecs
 - mediatek,platform: the phandle of MT8183 ASoC platform
 
-- 
2.28.0.526.ge36021eeef-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ASoC: mediatek: mt8183-da7219: support machine driver with rt1015p
  2020-09-11  2:48 [PATCH 0/2] ASoC: mediatek: mt8183-da7219: support machine driver for rt1015p Tzung-Bi Shih
  2020-09-11  2:48 ` [PATCH 1/2] ASoC: dt-bindings: mt8183-da7219: add compatible string for using rt1015p Tzung-Bi Shih
@ 2020-09-11  2:48 ` Tzung-Bi Shih
  2020-09-14 14:51 ` [PATCH 0/2] ASoC: mediatek: mt8183-da7219: support machine driver for rt1015p Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Tzung-Bi Shih @ 2020-09-11  2:48 UTC (permalink / raw)
  To: broonie, robh+dt; +Cc: devicetree, alsa-devel, tzungbi

Supports machine driver with rt1015p ("mt8183_da7219_rt1015p").
Embeds in the existing mt8183-da7219-max98357.c because they share
most of the code.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
 sound/soc/mediatek/Kconfig                    |  1 +
 .../mediatek/mt8183/mt8183-da7219-max98357.c  | 40 +++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig
index f7bc007bbdec..76e055d1dfb2 100644
--- a/sound/soc/mediatek/Kconfig
+++ b/sound/soc/mediatek/Kconfig
@@ -140,6 +140,7 @@ config SND_SOC_MT8183_DA7219_MAX98357A
 	select SND_SOC_MT6358
 	select SND_SOC_MAX98357A
 	select SND_SOC_RT1015
+	select SND_SOC_RT1015P
 	select SND_SOC_DA7219
 	select SND_SOC_BT_SCO
 	select SND_SOC_HDMI_CODEC
diff --git a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
index 06d0a4f80fc1..68fe23b96b14 100644
--- a/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
+++ b/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
@@ -348,6 +348,12 @@ SND_SOC_DAILINK_DEFS(i2s3_rt1015,
 			   COMP_CODEC(DA7219_DEV_NAME, DA7219_CODEC_DAI)),
 	DAILINK_COMP_ARRAY(COMP_EMPTY()));
 
+SND_SOC_DAILINK_DEFS(i2s3_rt1015p,
+	DAILINK_COMP_ARRAY(COMP_CPU("I2S3")),
+	DAILINK_COMP_ARRAY(COMP_CODEC("rt1015p", "HiFi"),
+			   COMP_CODEC(DA7219_DEV_NAME, DA7219_CODEC_DAI)),
+	DAILINK_COMP_ARRAY(COMP_EMPTY()));
+
 SND_SOC_DAILINK_DEFS(i2s5,
 	DAILINK_COMP_ARRAY(COMP_CPU("I2S5")),
 	DAILINK_COMP_ARRAY(COMP_CODEC("bt-sco", "bt-sco-pcm")),
@@ -641,6 +647,23 @@ static struct snd_soc_card mt8183_da7219_rt1015_card = {
 	.num_configs = ARRAY_SIZE(mt8183_da7219_rt1015_codec_conf),
 };
 
+static struct snd_soc_card mt8183_da7219_rt1015p_card = {
+	.name = "mt8183_da7219_rt1015p",
+	.owner = THIS_MODULE,
+	.controls = mt8183_da7219_max98357_snd_controls,
+	.num_controls = ARRAY_SIZE(mt8183_da7219_max98357_snd_controls),
+	.dapm_widgets = mt8183_da7219_max98357_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(mt8183_da7219_max98357_dapm_widgets),
+	.dapm_routes = mt8183_da7219_max98357_dapm_routes,
+	.num_dapm_routes = ARRAY_SIZE(mt8183_da7219_max98357_dapm_routes),
+	.dai_link = mt8183_da7219_dai_links,
+	.num_links = ARRAY_SIZE(mt8183_da7219_dai_links),
+	.aux_dev = &mt8183_da7219_max98357_headset_dev,
+	.num_aux_devs = 1,
+	.codec_conf = mt6358_codec_conf,
+	.num_configs = ARRAY_SIZE(mt6358_codec_conf),
+};
+
 static int mt8183_da7219_max98357_dev_probe(struct platform_device *pdev)
 {
 	struct snd_soc_card *card;
@@ -696,6 +719,19 @@ static int mt8183_da7219_max98357_dev_probe(struct platform_device *pdev)
 				dai_link->platforms = i2s3_rt1015_platforms;
 				dai_link->num_platforms =
 					ARRAY_SIZE(i2s3_rt1015_platforms);
+			} else if (card == &mt8183_da7219_rt1015p_card) {
+				dai_link->be_hw_params_fixup =
+					mt8183_rt1015_i2s_hw_params_fixup;
+				dai_link->ops = &mt8183_da7219_i2s_ops;
+				dai_link->cpus = i2s3_rt1015p_cpus;
+				dai_link->num_cpus =
+					ARRAY_SIZE(i2s3_rt1015p_cpus);
+				dai_link->codecs = i2s3_rt1015p_codecs;
+				dai_link->num_codecs =
+					ARRAY_SIZE(i2s3_rt1015p_codecs);
+				dai_link->platforms = i2s3_rt1015p_platforms;
+				dai_link->num_platforms =
+					ARRAY_SIZE(i2s3_rt1015p_platforms);
 			}
 		}
 
@@ -742,6 +778,10 @@ static const struct of_device_id mt8183_da7219_max98357_dt_match[] = {
 		.compatible = "mediatek,mt8183_da7219_rt1015",
 		.data = &mt8183_da7219_rt1015_card,
 	},
+	{
+		.compatible = "mediatek,mt8183_da7219_rt1015p",
+		.data = &mt8183_da7219_rt1015p_card,
+	},
 	{}
 };
 #endif
-- 
2.28.0.526.ge36021eeef-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] ASoC: mediatek: mt8183-da7219: support machine driver for rt1015p
  2020-09-11  2:48 [PATCH 0/2] ASoC: mediatek: mt8183-da7219: support machine driver for rt1015p Tzung-Bi Shih
  2020-09-11  2:48 ` [PATCH 1/2] ASoC: dt-bindings: mt8183-da7219: add compatible string for using rt1015p Tzung-Bi Shih
  2020-09-11  2:48 ` [PATCH 2/2] ASoC: mediatek: mt8183-da7219: support machine driver with rt1015p Tzung-Bi Shih
@ 2020-09-14 14:51 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2020-09-14 14:51 UTC (permalink / raw)
  To: robh+dt, Tzung-Bi Shih; +Cc: devicetree, alsa-devel

On Fri, 11 Sep 2020 10:48:31 +0800, Tzung-Bi Shih wrote:
> The series reuses mt8183-da7219-max98357.c for supporting machine
> driver with rt1015p speaker amplifier.
> 
> The 1st patch adds document for the new proposed compatible string.
> 
> The 2nd patch changes the machine driver to support "RT1015P" codec.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: dt-bindings: mt8183-da7219: add compatible string for using rt1015p
      commit: 5d1e0557520862c3a73b8b6a809807be1b522c3f
[2/2] ASoC: mediatek: mt8183-da7219: support machine driver with rt1015p
      commit: 7e5bfdddd8772011a2d38cf6be821d616db6cf8c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-14 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11  2:48 [PATCH 0/2] ASoC: mediatek: mt8183-da7219: support machine driver for rt1015p Tzung-Bi Shih
2020-09-11  2:48 ` [PATCH 1/2] ASoC: dt-bindings: mt8183-da7219: add compatible string for using rt1015p Tzung-Bi Shih
2020-09-11  2:48 ` [PATCH 2/2] ASoC: mediatek: mt8183-da7219: support machine driver with rt1015p Tzung-Bi Shih
2020-09-14 14:51 ` [PATCH 0/2] ASoC: mediatek: mt8183-da7219: support machine driver for rt1015p Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).