This is a follow up of patchset:
[RFC patch 0/5] Support BCLK input clock in tlv320aic31xx
Sound cards may allow using different main clock inputs. In the generic
fsl-asoc-card driver, these values are hardcoded for each specific card
configuration.
Let's make it more flexible, allowing setting mclk-id from the
device-tree node.
Ariel D'Alessandro (4):
dt-bindings: sound: Rename tlv320aic31xx-micbias as tlv320aic31xx
dt-bindings: tlv320aic31xx: Define PLL clock inputs
ASoC: fsl-asoc-card: Add optional dt property for setting mclk-id
ASoC: fsl-asoc-card: Remove BCLK default value for tlv320aic31xx card
.../devicetree/bindings/sound/fsl-asoc-card.txt | 1 +
.../devicetree/bindings/sound/tlv320aic31xx.txt | 2 +-
arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-
include/dt-bindings/sound/tlv320aic31xx-micbias.h | 9 ---------
include/dt-bindings/sound/tlv320aic31xx.h | 14 ++++++++++++++
sound/soc/codecs/tlv320aic31xx.c | 2 +-
sound/soc/fsl/fsl-asoc-card.c | 7 ++++++-
7 files changed, 24 insertions(+), 13 deletions(-)
delete mode 100644 include/dt-bindings/sound/tlv320aic31xx-micbias.h
create mode 100644 include/dt-bindings/sound/tlv320aic31xx.h
--
2.30.2
Sound cards may allow using different main clock inputs. In the generic
fsl-asoc-card driver, these values are hardcoded for each specific card
configuration.
Let's make it more flexible, allowing setting mclk-id from the
device-tree node. Otherwise, the default value for each card
configuration is used.
Signed-off-by: Ariel D'Alessandro <redacted>
---
Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 1 +
sound/soc/fsl/fsl-asoc-card.c | 6 ++++++
2 files changed, 7 insertions(+)
@@ -82,6 +82,7 @@ Optional properties: - dai-format : audio format, for details see simple-card.yaml. - frame-inversion : dai-link uses frame clock inversion, for details see simple-card.yaml. - bitclock-inversion : dai-link uses bit clock inversion, for details see simple-card.yaml.+ - mclk-id : main clock id, specific for each card configuration. Optional unless SSI is selected as a CPU DAI:
@@ -693,6 +693,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)gotoasrc_fail;}+/*+*Allowsettingmclk-idfromthedevice-treenode.Otherwise,the+*defaultvalueforeachcardconfigurationisused.+*/+of_property_read_u32(np,"mclk-id",&priv->codec_priv.mclk_id);+/* Format info from DT is optional. */snd_soc_daifmt_parse_clock_provider_as_phandle(np,NULL,&bitclkprovider,&frameprovider);if(bitclkprovider||frameprovider){
Now that fsl-asoc-card support setting mclk-id through the device-tree
mclk-id property, let's remove the default BCLK configuration for this
card.
Signed-off-by: Ariel D'Alessandro <redacted>
---
sound/soc/fsl/fsl-asoc-card.c | 1 -
1 file changed, 1 deletion(-)
From: Rob Herring <robh@kernel.org> Date: 2021-12-13 20:35:42
On Fri, Dec 03, 2021 at 10:49:26AM -0300, Ariel D'Alessandro wrote:
This is a follow up of patchset:
[RFC patch 0/5] Support BCLK input clock in tlv320aic31xx
Link?
Sound cards may allow using different main clock inputs. In the generic
fsl-asoc-card driver, these values are hardcoded for each specific card
configuration.
Let's make it more flexible, allowing setting mclk-id from the
device-tree node.
Ariel D'Alessandro (4):
dt-bindings: sound: Rename tlv320aic31xx-micbias as tlv320aic31xx
dt-bindings: tlv320aic31xx: Define PLL clock inputs
ASoC: fsl-asoc-card: Add optional dt property for setting mclk-id
From: Rob Herring <robh@kernel.org> Date: 2021-12-13 20:37:25
On Fri, Dec 03, 2021 at 10:49:29AM -0300, Ariel D'Alessandro wrote:
quoted hunk
Sound cards may allow using different main clock inputs. In the generic
fsl-asoc-card driver, these values are hardcoded for each specific card
configuration.
Let's make it more flexible, allowing setting mclk-id from the
device-tree node. Otherwise, the default value for each card
configuration is used.
Signed-off-by: Ariel D'Alessandro <redacted>
---
Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 1 +
sound/soc/fsl/fsl-asoc-card.c | 6 ++++++
2 files changed, 7 insertions(+)
@@ -82,6 +82,7 @@ Optional properties: - dai-format : audio format, for details see simple-card.yaml. - frame-inversion : dai-link uses frame clock inversion, for details see simple-card.yaml. - bitclock-inversion : dai-link uses bit clock inversion, for details see simple-card.yaml.+ - mclk-id : main clock id, specific for each card configuration.
Ahh, there it is. This change and the header defines should be 1 patch
and driver changes another.
@@ -693,6 +693,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)gotoasrc_fail;}+/*+*Allowsettingmclk-idfromthedevice-treenode.Otherwise,the+*defaultvalueforeachcardconfigurationisused.+*/+of_property_read_u32(np,"mclk-id",&priv->codec_priv.mclk_id);+/* Format info from DT is optional. */snd_soc_daifmt_parse_clock_provider_as_phandle(np,NULL,&bitclkprovider,&frameprovider);if(bitclkprovider||frameprovider){
Sound cards may allow using different main clock inputs. In the generic
fsl-asoc-card driver, these values are hardcoded for each specific card
configuration.
Let's make it more flexible, allowing setting mclk-id from the
device-tree node.
Ariel D'Alessandro (4):
dt-bindings: sound: Rename tlv320aic31xx-micbias as tlv320aic31xx
dt-bindings: tlv320aic31xx: Define PLL clock inputs
ASoC: fsl-asoc-card: Add optional dt property for setting mclk-id
On Fri, Dec 03, 2021 at 10:49:29AM -0300, Ariel D'Alessandro wrote:
quoted
Sound cards may allow using different main clock inputs. In the generic
fsl-asoc-card driver, these values are hardcoded for each specific card
configuration.
Let's make it more flexible, allowing setting mclk-id from the
device-tree node. Otherwise, the default value for each card
configuration is used.
Signed-off-by: Ariel D'Alessandro <redacted>
---
Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 1 +
sound/soc/fsl/fsl-asoc-card.c | 6 ++++++
2 files changed, 7 insertions(+)
@@ -82,6 +82,7 @@ Optional properties: - dai-format : audio format, for details see simple-card.yaml. - frame-inversion : dai-link uses frame clock inversion, for details see simple-card.yaml. - bitclock-inversion : dai-link uses bit clock inversion, for details see simple-card.yaml.+ - mclk-id : main clock id, specific for each card configuration.
Ahh, there it is. This change and the header defines should be 1 patch
and driver changes another.
Ah, I see. I'll split it and send a patchset v2 for this.
Thanks,
Ariel