Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3727e98 authored by Damir Didjusto's avatar Damir Didjusto
Browse files

ASoC: msm: qdsp6v2: Add support for multiple slots in auxpcm data



Auxpcm data can be placed in multiple slots in one frame.
The number of slots that can be in one frame is determined by
diving the number of bits per frame with bits per sample. For example
in 256 bit frame size configuration with 16 bits per sample
there will be 16 slots.  ADSP currently supports receiving
information on four slots, however the driver only supports
one slot. This change adds support for multiple auxpcm slots.

Change-Id: Icfa3fd0cba5d2009be89d9230494d2a33a7b930c
Signed-off-by: default avatarDamir Didjusto <damird@codeaurora.org>
parent 62e43848
Loading
Loading
Loading
Loading
+17 −5
Original line number Diff line number Diff line
@@ -197,10 +197,21 @@ Required properties:
                                          is for 16khz
                                          2 - Linear quantization

 - qcom,msm-cpudai-auxpcm-slot:           Slot number for multichannel scenario
                                          The first value is for 8khz mode the
                                          second is for 16khz
                                          Value is 1
 - qcom,msm-cpudai-auxpcm-num-slots:      Number of slots per mode in the
                                          msm-cpudai-auxpcm-slot-mapping
                                          array.
                                          The first value is for 8khz mode, the
                                          second is for 16khz. Max number of
                                          slots supported by DSP is 4, anything
                                          above 4 will be truncated to 4 when
                                          sent to DSP.

 - qcom,msm-cpudai-auxpcm-slot-mapping:   Array of slot numbers for multi
                                          slot scenario. The first array
                                          is for 8khz mode, the second is
                                          for 16khz. The size of the array
                                          is determined by the value in
                                          qcom,msm-cpudai-auxpcm-num-slots

 - qcom,msm-cpudai-auxpcm-data:           Data field - 0. The first value is
                                          for 8khz mode, the second is for
@@ -452,7 +463,8 @@ Example:
		qcom,msm-cpudai-auxpcm-sync = <1>, <1>;
		qcom,msm-cpudai-auxpcm-frame = <5>, <4>;
		qcom,msm-cpudai-auxpcm-quant = <2>, <2>;
		qcom,msm-cpudai-auxpcm-slot = <1>, <1>;
		qcom,msm-cpudai-auxpcm-num-slots = <4>, <4>;
		qcom,msm-cpudai-auxpcm-slot-mapping = <1 0 0 0>, <1 3 0 0>;
		qcom,msm-cpudai-auxpcm-data = <0>, <0>;
		qcom,msm-cpudai-auxpcm-pcm-clk-rate = <2048000>, <2048000>;
		qcom,msm-auxpcm-interface = "primary";
+4 −2
Original line number Diff line number Diff line
@@ -3661,7 +3661,8 @@
		qcom,msm-cpudai-auxpcm-sync = <1>, <1>;
		qcom,msm-cpudai-auxpcm-frame = <5>, <4>;
		qcom,msm-cpudai-auxpcm-quant = <2>, <2>;
		qcom,msm-cpudai-auxpcm-slot = <1>, <1>;
		qcom,msm-cpudai-auxpcm-num-slots = <1>, <1>;
		qcom,msm-cpudai-auxpcm-slot-mapping = <1>, <1>;
		qcom,msm-cpudai-auxpcm-data = <0>, <0>;
		qcom,msm-cpudai-auxpcm-pcm-clk-rate = <2048000>, <2048000>;
		qcom,msm-auxpcm-interface = "primary";
@@ -3673,7 +3674,8 @@
		qcom,msm-cpudai-auxpcm-sync = <1>, <1>;
		qcom,msm-cpudai-auxpcm-frame = <5>, <4>;
		qcom,msm-cpudai-auxpcm-quant = <2>, <2>;
		qcom,msm-cpudai-auxpcm-slot = <1>, <1>;
		qcom,msm-cpudai-auxpcm-num-slots = <1>, <1>;
		qcom,msm-cpudai-auxpcm-slot-mapping = <1>, <1>;
		qcom,msm-cpudai-auxpcm-data = <0>, <0>;
		qcom,msm-cpudai-auxpcm-pcm-clk-rate = <2048000>, <2048000>;
		qcom,msm-auxpcm-interface = "secondary";
+2 −1
Original line number Diff line number Diff line
@@ -1083,7 +1083,8 @@
		qcom,msm-cpudai-auxpcm-sync = <1>, <1>;
		qcom,msm-cpudai-auxpcm-frame = <5>, <4>;
		qcom,msm-cpudai-auxpcm-quant = <2>, <2>;
		qcom,msm-cpudai-auxpcm-slot = <1>, <1>;
		qcom,msm-cpudai-auxpcm-num-slots = <1>, <1>;
		qcom,msm-cpudai-auxpcm-slot-mapping = <1>, <1>;
		qcom,msm-cpudai-auxpcm-data = <0>, <0>;
		qcom,msm-cpudai-auxpcm-pcm-clk-rate = <2048000>, <2048000>;
		qcom,msm-auxpcm-interface = "primary";
+2 −1
Original line number Diff line number Diff line
@@ -651,7 +651,8 @@
		qcom,msm-cpudai-auxpcm-sync = <1>, <1>;
		qcom,msm-cpudai-auxpcm-frame = <5>, <4>;
		qcom,msm-cpudai-auxpcm-quant = <2>, <2>;
		qcom,msm-cpudai-auxpcm-slot = <1>, <1>;
		qcom,msm-cpudai-auxpcm-num-slots = <1>, <1>;
		qcom,msm-cpudai-auxpcm-slot-mapping = <1>, <1>;
		qcom,msm-cpudai-auxpcm-data = <0>, <0>;
		qcom,msm-cpudai-auxpcm-pcm-clk-rate = <2048000>, <2048000>;
		qcom,msm-auxpcm-interface = "primary";
+2 −1
Original line number Diff line number Diff line
@@ -995,7 +995,8 @@
		qcom,msm-cpudai-auxpcm-sync = <1>, <1>;
		qcom,msm-cpudai-auxpcm-frame = <5>, <4>;
		qcom,msm-cpudai-auxpcm-quant = <2>, <2>;
		qcom,msm-cpudai-auxpcm-slot = <1>, <1>;
		qcom,msm-cpudai-auxpcm-num-slots = <1>, <1>;
		qcom,msm-cpudai-auxpcm-slot-mapping = <1>, <1>;
		qcom,msm-cpudai-auxpcm-data = <0>, <0>;
		qcom,msm-cpudai-auxpcm-pcm-clk-rate = <2048000>, <2048000>;
		qcom,msm-auxpcm-interface = "primary";
Loading