* [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines
@ 2020-07-27 8:25 Stephan Gerhold
2020-07-27 9:51 ` [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX,TX,RX} defines Srinivas Kandagatla
2020-07-27 13:56 ` [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Stephan Gerhold @ 2020-07-27 8:25 UTC (permalink / raw)
To: Mark Brown
Cc: devicetree, alsa-devel, Banajit Goswami, Stephan Gerhold,
Patrick Lai, Liam Girdwood, Rob Herring, Srinivas Kandagatla
Right now the direction of a DAI has to be specified as a literal
number in the device tree, e.g.:
dai@0 {
reg = <0>;
direction = <2>;
};
but this does not make it immediately clear that this is a
playback/RX-only DAI.
Actually, q6asm-dai.c has useful defines for this. Move them to the
dt-bindings header to allow using them in the dts(i) files.
The example above then becomes:
dai@0 {
reg = <0>;
direction = <Q6ASM_DAI_RX>;
};
which is immediately recognizable as playback/RX-only DAI.
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
Documentation/devicetree/bindings/sound/qcom,q6asm.txt | 9 +++++----
include/dt-bindings/sound/qcom,q6asm.h | 4 ++++
sound/soc/qcom/qdsp6/q6asm-dai.c | 3 ---
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
index 6b9a88d0ea3f..8c4883becae9 100644
--- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
@@ -39,9 +39,9 @@ configuration of each dai. Must contain the following properties.
Usage: Required for Compress offload dais
Value type: <u32>
Definition: Specifies the direction of the dai stream
- 0 for both tx and rx
- 1 for only tx (Capture/Encode)
- 2 for only rx (Playback/Decode)
+ Q6ASM_DAI_TX_RX (0) for both tx and rx
+ Q6ASM_DAI_TX (1) for only tx (Capture/Encode)
+ Q6ASM_DAI_RX (2) for only rx (Playback/Decode)
- is-compress-dai:
Usage: Required for Compress offload dais
@@ -50,6 +50,7 @@ configuration of each dai. Must contain the following properties.
= EXAMPLE
+#include <dt-bindings/sound/qcom,q6asm.h>
apr-service@7 {
compatible = "qcom,q6asm";
@@ -62,7 +63,7 @@ apr-service@7 {
dai@0 {
reg = <0>;
- direction = <2>;
+ direction = <Q6ASM_DAI_RX>;
is-compress-dai;
};
};
diff --git a/include/dt-bindings/sound/qcom,q6asm.h b/include/dt-bindings/sound/qcom,q6asm.h
index 1eb77d87c2e8..f59d74f14395 100644
--- a/include/dt-bindings/sound/qcom,q6asm.h
+++ b/include/dt-bindings/sound/qcom,q6asm.h
@@ -19,4 +19,8 @@
#define MSM_FRONTEND_DAI_MULTIMEDIA15 14
#define MSM_FRONTEND_DAI_MULTIMEDIA16 15
+#define Q6ASM_DAI_TX_RX 0
+#define Q6ASM_DAI_TX 1
+#define Q6ASM_DAI_RX 2
+
#endif /* __DT_BINDINGS_Q6_ASM_H__ */
diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
index a2acb7564eb8..9b7b218f2a20 100644
--- a/sound/soc/qcom/qdsp6/q6asm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
@@ -37,9 +37,6 @@
#define COMPR_PLAYBACK_MAX_FRAGMENT_SIZE (128 * 1024)
#define COMPR_PLAYBACK_MIN_NUM_FRAGMENTS (4)
#define COMPR_PLAYBACK_MAX_NUM_FRAGMENTS (16 * 4)
-#define Q6ASM_DAI_TX_RX 0
-#define Q6ASM_DAI_TX 1
-#define Q6ASM_DAI_RX 2
#define ALAC_CH_LAYOUT_MONO ((101 << 16) | 1)
#define ALAC_CH_LAYOUT_STEREO ((101 << 16) | 2)
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX,TX,RX} defines
2020-07-27 8:25 [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines Stephan Gerhold
@ 2020-07-27 9:51 ` Srinivas Kandagatla
2020-07-27 13:56 ` [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2020-07-27 9:51 UTC (permalink / raw)
To: Stephan Gerhold, Mark Brown
Cc: devicetree, alsa-devel, Banajit Goswami, Patrick Lai,
Liam Girdwood, Rob Herring
On 27/07/2020 09:25, Stephan Gerhold wrote:
> Right now the direction of a DAI has to be specified as a literal
> number in the device tree, e.g.:
>
> dai@0 {
> reg = <0>;
> direction = <2>;
> };
>
> but this does not make it immediately clear that this is a
> playback/RX-only DAI.
>
> Actually, q6asm-dai.c has useful defines for this. Move them to the
> dt-bindings header to allow using them in the dts(i) files.
> The example above then becomes:
>
> dai@0 {
> reg = <0>;
> direction = <Q6ASM_DAI_RX>;
> };
>
> which is immediately recognizable as playback/RX-only DAI.
>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Thanks Stephan,
Looks good to me,
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
--srini
> ---
> Documentation/devicetree/bindings/sound/qcom,q6asm.txt | 9 +++++----
> include/dt-bindings/sound/qcom,q6asm.h | 4 ++++
> sound/soc/qcom/qdsp6/q6asm-dai.c | 3 ---
> 3 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
> index 6b9a88d0ea3f..8c4883becae9 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
> +++ b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
> @@ -39,9 +39,9 @@ configuration of each dai. Must contain the following properties.
> Usage: Required for Compress offload dais
> Value type: <u32>
> Definition: Specifies the direction of the dai stream
> - 0 for both tx and rx
> - 1 for only tx (Capture/Encode)
> - 2 for only rx (Playback/Decode)
> + Q6ASM_DAI_TX_RX (0) for both tx and rx
> + Q6ASM_DAI_TX (1) for only tx (Capture/Encode)
> + Q6ASM_DAI_RX (2) for only rx (Playback/Decode)
>
> - is-compress-dai:
> Usage: Required for Compress offload dais
> @@ -50,6 +50,7 @@ configuration of each dai. Must contain the following properties.
>
>
> = EXAMPLE
> +#include <dt-bindings/sound/qcom,q6asm.h>
>
> apr-service@7 {
> compatible = "qcom,q6asm";
> @@ -62,7 +63,7 @@ apr-service@7 {
>
> dai@0 {
> reg = <0>;
> - direction = <2>;
> + direction = <Q6ASM_DAI_RX>;
> is-compress-dai;
> };
> };
> diff --git a/include/dt-bindings/sound/qcom,q6asm.h b/include/dt-bindings/sound/qcom,q6asm.h
> index 1eb77d87c2e8..f59d74f14395 100644
> --- a/include/dt-bindings/sound/qcom,q6asm.h
> +++ b/include/dt-bindings/sound/qcom,q6asm.h
> @@ -19,4 +19,8 @@
> #define MSM_FRONTEND_DAI_MULTIMEDIA15 14
> #define MSM_FRONTEND_DAI_MULTIMEDIA16 15
>
> +#define Q6ASM_DAI_TX_RX 0
> +#define Q6ASM_DAI_TX 1
> +#define Q6ASM_DAI_RX 2
> +
> #endif /* __DT_BINDINGS_Q6_ASM_H__ */
> diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
> index a2acb7564eb8..9b7b218f2a20 100644
> --- a/sound/soc/qcom/qdsp6/q6asm-dai.c
> +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
> @@ -37,9 +37,6 @@
> #define COMPR_PLAYBACK_MAX_FRAGMENT_SIZE (128 * 1024)
> #define COMPR_PLAYBACK_MIN_NUM_FRAGMENTS (4)
> #define COMPR_PLAYBACK_MAX_NUM_FRAGMENTS (16 * 4)
> -#define Q6ASM_DAI_TX_RX 0
> -#define Q6ASM_DAI_TX 1
> -#define Q6ASM_DAI_RX 2
>
> #define ALAC_CH_LAYOUT_MONO ((101 << 16) | 1)
> #define ALAC_CH_LAYOUT_STEREO ((101 << 16) | 2)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines
2020-07-27 8:25 [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines Stephan Gerhold
2020-07-27 9:51 ` [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX,TX,RX} defines Srinivas Kandagatla
@ 2020-07-27 13:56 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-07-27 13:56 UTC (permalink / raw)
To: Stephan Gerhold
Cc: devicetree, alsa-devel, Banajit Goswami, Patrick Lai,
Liam Girdwood, Rob Herring, Srinivas Kandagatla
On Mon, 27 Jul 2020 10:25:02 +0200, Stephan Gerhold wrote:
> Right now the direction of a DAI has to be specified as a literal
> number in the device tree, e.g.:
>
> dai@0 {
> reg = <0>;
> direction = <2>;
> };
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines
commit: 34facb04228b36006a37727fddee59cf069d95d4
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-07-27 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 8:25 [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines Stephan Gerhold
2020-07-27 9:51 ` [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX,TX,RX} defines Srinivas Kandagatla
2020-07-27 13:56 ` [PATCH] ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines 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).