* [PATCH 1/2] dt-bindings: tas2562: Add the TAS2110 amplifier
@ 2020-09-21 15:38 Dan Murphy
2020-09-21 15:38 ` [PATCH 2/2] ASoC: tas2562: Add the TAS2110 class-D amplifier Dan Murphy
2020-09-22 0:05 ` [PATCH 1/2] dt-bindings: tas2562: Add the TAS2110 amplifier Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Dan Murphy @ 2020-09-21 15:38 UTC (permalink / raw)
To: lgirdwood, broonie, tiwai, robh+dt
Cc: devicetree, alsa-devel, linux-kernel, Dan Murphy
Add the TAS2110 amplifier compatible.
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
This patchset is based on top of patchset https://lore.kernel.org/patchwork/project/lkml/list/?series=463709
Documentation/devicetree/bindings/sound/tas2562.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/tas2562.yaml b/Documentation/devicetree/bindings/sound/tas2562.yaml
index d3ceda356aaa..27f7132ba2ef 100644
--- a/Documentation/devicetree/bindings/sound/tas2562.yaml
+++ b/Documentation/devicetree/bindings/sound/tas2562.yaml
@@ -20,6 +20,7 @@ description: |
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
properties:
compatible:
@@ -27,6 +28,7 @@ properties:
- ti,tas2562
- ti,tas2563
- ti,tas2564
+ - ti,tas2110
reg:
maxItems: 1
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ASoC: tas2562: Add the TAS2110 class-D amplifier
2020-09-21 15:38 [PATCH 1/2] dt-bindings: tas2562: Add the TAS2110 amplifier Dan Murphy
@ 2020-09-21 15:38 ` Dan Murphy
2020-09-22 0:05 ` [PATCH 1/2] dt-bindings: tas2562: Add the TAS2110 amplifier Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Dan Murphy @ 2020-09-21 15:38 UTC (permalink / raw)
To: lgirdwood, broonie, tiwai, robh+dt
Cc: devicetree, alsa-devel, linux-kernel, Dan Murphy
Add the TAS2110 amplifier to the TAS2562 driver. The TAS2110 is register
and bitmap compatible. The chips differ in that the TAS2110 does not
have the I/V Sense feedback path. Since these features do not exist the
device needs to be registered without these controls.
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
This patchset is based on top of patchset https://lore.kernel.org/patchwork/project/lkml/list/?series=463709
sound/soc/codecs/tas2562.c | 48 ++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c
index 56d410141ee0..da820e8d59a1 100644
--- a/sound/soc/codecs/tas2562.c
+++ b/sound/soc/codecs/tas2562.c
@@ -53,12 +53,14 @@ struct tas2562_data {
int v_sense_slot;
int i_sense_slot;
int volume_lvl;
+ int model_id;
};
enum tas256x_model {
TAS2562,
TAS2563,
TAS2564,
+ TAS2110,
};
static int tas2562_set_bias_level(struct snd_soc_component *component,
@@ -569,6 +571,40 @@ static const struct snd_kcontrol_new tas2562_snd_controls[] = {
},
};
+static const struct snd_soc_dapm_widget tas2110_dapm_widgets[] = {
+ SND_SOC_DAPM_AIF_IN("ASI1", "ASI1 Playback", 0, SND_SOC_NOPM, 0, 0),
+ SND_SOC_DAPM_MUX("ASI1 Sel", SND_SOC_NOPM, 0, 0, &tas2562_asi1_mux),
+ SND_SOC_DAPM_DAC_E("DAC", NULL, SND_SOC_NOPM, 0, 0, tas2562_dac_event,
+ SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
+ SND_SOC_DAPM_OUTPUT("OUT"),
+};
+
+static const struct snd_soc_dapm_route tas2110_audio_map[] = {
+ {"ASI1 Sel", "I2C offset", "ASI1"},
+ {"ASI1 Sel", "Left", "ASI1"},
+ {"ASI1 Sel", "Right", "ASI1"},
+ {"ASI1 Sel", "LeftRightDiv2", "ASI1"},
+ { "DAC", NULL, "ASI1 Sel" },
+ { "OUT", NULL, "DAC" },
+};
+
+static const struct snd_soc_component_driver soc_component_dev_tas2110 = {
+ .probe = tas2562_codec_probe,
+ .suspend = tas2562_suspend,
+ .resume = tas2562_resume,
+ .set_bias_level = tas2562_set_bias_level,
+ .controls = tas2562_snd_controls,
+ .num_controls = ARRAY_SIZE(tas2562_snd_controls),
+ .dapm_widgets = tas2110_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(tas2110_dapm_widgets),
+ .dapm_routes = tas2110_audio_map,
+ .num_dapm_routes = ARRAY_SIZE(tas2110_audio_map),
+ .idle_bias_on = 1,
+ .use_pmdown_time = 1,
+ .endianness = 1,
+ .non_legacy_dai_naming = 1,
+};
+
static const struct snd_soc_dapm_widget tas2562_dapm_widgets[] = {
SND_SOC_DAPM_AIF_IN("ASI1", "ASI1 Playback", 0, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_MUX("ASI1 Sel", SND_SOC_NOPM, 0, 0, &tas2562_asi1_mux),
@@ -703,6 +739,9 @@ static int tas2562_parse_dt(struct tas2562_data *tas2562)
tas2562->sdz_gpio = NULL;
}
+ if (tas2562->model_id == TAS2110)
+ return ret;
+
ret = fwnode_property_read_u32(dev->fwnode, "ti,imon-slot-no",
&tas2562->i_sense_slot);
if (ret) {
@@ -741,6 +780,7 @@ static int tas2562_probe(struct i2c_client *client,
data->client = client;
data->dev = &client->dev;
+ data->model_id = id->driver_data;
tas2562_parse_dt(data);
@@ -753,6 +793,12 @@ static int tas2562_probe(struct i2c_client *client,
dev_set_drvdata(&client->dev, data);
+ if (data->model_id == TAS2110)
+ return devm_snd_soc_register_component(dev,
+ &soc_component_dev_tas2110,
+ tas2562_dai,
+ ARRAY_SIZE(tas2562_dai));
+
return devm_snd_soc_register_component(dev, &soc_component_dev_tas2562,
tas2562_dai,
ARRAY_SIZE(tas2562_dai));
@@ -763,6 +809,7 @@ static const struct i2c_device_id tas2562_id[] = {
{ "tas2562", TAS2562 },
{ "tas2563", TAS2563 },
{ "tas2564", TAS2564 },
+ { "tas2110", TAS2110 },
{ }
};
MODULE_DEVICE_TABLE(i2c, tas2562_id);
@@ -771,6 +818,7 @@ static const struct of_device_id tas2562_of_match[] = {
{ .compatible = "ti,tas2562", },
{ .compatible = "ti,tas2563", },
{ .compatible = "ti,tas2564", },
+ { .compatible = "ti,tas2110", },
{ },
};
MODULE_DEVICE_TABLE(of, tas2562_of_match);
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] dt-bindings: tas2562: Add the TAS2110 amplifier
2020-09-21 15:38 [PATCH 1/2] dt-bindings: tas2562: Add the TAS2110 amplifier Dan Murphy
2020-09-21 15:38 ` [PATCH 2/2] ASoC: tas2562: Add the TAS2110 class-D amplifier Dan Murphy
@ 2020-09-22 0:05 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-09-22 0:05 UTC (permalink / raw)
To: robh+dt, tiwai, lgirdwood, Dan Murphy
Cc: alsa-devel, devicetree, linux-kernel
On Mon, 21 Sep 2020 10:38:19 -0500, Dan Murphy wrote:
> Add the TAS2110 amplifier compatible.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] dt-bindings: tas2562: Add the TAS2110 amplifier
commit: 9074a078435eb9c4e16862ec08faaf19aee6190f
[2/2] ASoC: tas2562: Add the TAS2110 class-D amplifier
commit: 8adcdbe63aa7745ecd253b6dcf03cd2d30ece8f5
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] 3+ messages in thread
end of thread, other threads:[~2020-09-22 0:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-21 15:38 [PATCH 1/2] dt-bindings: tas2562: Add the TAS2110 amplifier Dan Murphy
2020-09-21 15:38 ` [PATCH 2/2] ASoC: tas2562: Add the TAS2110 class-D amplifier Dan Murphy
2020-09-22 0:05 ` [PATCH 1/2] dt-bindings: tas2562: Add the TAS2110 amplifier Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox