Message ID | 1433854769-23807-1-git-send-email-srinivas.kandagatla@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Jun 09, 2015 at 01:59:29PM +0100, Srinivas Kandagatla wrote: > +Optional CPU/CODEC subnodes properties: > +- external : flag to indicate if the I2S is connected to external codec > +Example: Missing blank line between the property and the "Example:". I'm still not sure I understand why we need a boolean property indicating if an external CODEC is in use - what is the consequence of setting this property?
On 09/06/15 17:57, Mark Brown wrote: > On Tue, Jun 09, 2015 at 01:59:29PM +0100, Srinivas Kandagatla wrote: > >> >+Optional CPU/CODEC subnodes properties: >> >+- external : flag to indicate if the I2S is connected to external codec >> >+Example: > Missing blank line between the property and the "Example:". I'm still I will fix it in next version. > not sure I understand why we need a boolean property indicating if an > external CODEC is in use - what is the consequence of setting this > property? As of today, the consequence of setting this flag is to setup correct dai_link names. Also there are some limitations on which MI2S can be configured to external or internal codecs, this flag can be used in future to validate such configurations, if required. --srini
On Tue, Jun 09, 2015 at 06:08:24PM +0100, Srinivas Kandagatla wrote: > >>>+- external : flag to indicate if the I2S is connected to external codec > >not sure I understand why we need a boolean property indicating if an > >external CODEC is in use - what is the consequence of setting this > >property? > As of today, the consequence of setting this flag is to setup correct > dai_link names. > Also there are some limitations on which MI2S can be configured to external > or internal codecs, this flag can be used in future to validate such > configurations, if required. That validation sounds like something that the SoC drivers should be doing if required rather than the machine driver - otherwise every machine driver using this SoC would have to implement the same validation.
On 09/06/15 18:13, Mark Brown wrote: > On Tue, Jun 09, 2015 at 06:08:24PM +0100, Srinivas Kandagatla wrote: > >>>>> +- external : flag to indicate if the I2S is connected to external codec > >>> not sure I understand why we need a boolean property indicating if an >>> external CODEC is in use - what is the consequence of setting this >>> property? > >> As of today, the consequence of setting this flag is to setup correct >> dai_link names. >> Also there are some limitations on which MI2S can be configured to external >> or internal codecs, this flag can be used in future to validate such >> configurations, if required. > > That validation sounds like something that the SoC drivers should be > doing if required rather than the machine driver - otherwise every > machine driver using this SoC would have to implement the same > validation. Thats a valid point, for now I can move to using dai link name property instead of external flag, this should work for now. I will add the validation logic in SOC driver if required in future. >
diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt new file mode 100644 index 0000000..01d62be --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt @@ -0,0 +1,61 @@ +* Qualcomm Technologies APQ8016 SBC ASoC machine driver + +This node models the Qualcomm Technologies APQ8016 SBC ASoC machine driver + +Required properties: + +- compatible : "qcom,apq8016-sbc-sndcard" + +- pinctrl-N : One property must exist for each entry in + pinctrl-names. See ../pinctrl/pinctrl-bindings.txt + for details of the property values. +- pinctrl-names : Must contain a "default" entry. +- reg : Must contain an address for each entry in reg-names. +- reg-names : A list which must include the following entries: + * "mic-iomux" + * "spkr-iomux" +- qcom,model : Name of the sound card. + +Dai-link subnode properties and subnodes: + +Required dai-link subnodes: + +- cpu : CPU sub-node +- codec : CODEC sub-node + +Required CPU/CODEC subnodes properties: + +-sound-dai : phandle and port of CPU/CODEC +-capture-dai : phandle and port of CPU/CODEC + +Optional CPU/CODEC subnodes properties: +- external : flag to indicate if the I2S is connected to external codec +Example: + +sound: sound { + compatible = "qcom,apq8016-sbc-sndcard"; + reg = <0x07702000 0x4>, <0x07702004 0x4>; + reg-names = "mic-iomux", "spkr-iomux"; + qcom,model = "DB410c"; + + /* I2S - Internal codec */ + internal-dai-link@0 { + cpu { /* PRIMARY */ + sound-dai = <&lpass MI2S_PRIMARY>; + }; + codec { + sound-dai = <&wcd_codec 0>; + }; + }; + + /* External Primary or External Secondary -ADV7533 HDMI */ + external-dai-link@0 { + external; + cpu { /* QUAT */ + sound-dai = <&lpass MI2S_QUATERNARY>; + }; + codec { + sound-dai = <&adv_bridge 0>; + }; + }; +};