Skip to content

Commit 1c312fb

Browse files
committed
ASoC: wm_adsp: Rename memory fields in wm_adsp_buffer
The wm_adsp_buffer struct is the control header of a circular buffer used to transfer data from the firmware over the control interface to an ALSA compressed stream. The original names of the fields pointing to the data buffer were based on ADSP2V2 memory layout where they correspond to {XM, XM, YM}. But this circular buffer could be used on other types of DSP core that have different memory region types. Also the names and description of the size fields were not very clear. The field names and descriptions have been changed to be generic and not imply any particular memory types. This patch updates the wm_adsp driver to the new field names. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Mark Brown <[email protected]> (cherry picked from commit 2a2aefa) Change-Id: I3be86d04acb154b2b7aeca66945dee3e3f6d121e Signed-off-by: Richard Fitzgerald <[email protected]>
1 parent 636535b commit 1c312fb

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

sound/soc/codecs/wm_adsp.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,12 @@ struct wm_adsp_alg_xm_struct {
547547
};
548548

549549
struct wm_adsp_buffer {
550-
__be32 X_buf_base; /* XM base addr of first X area */
551-
__be32 X_buf_size; /* Size of 1st X area in words */
552-
__be32 X_buf_base2; /* XM base addr of 2nd X area */
553-
__be32 X_buf_brk; /* Total X size in words */
554-
__be32 Y_buf_base; /* YM base addr of Y area */
555-
__be32 wrap; /* Total size X and Y in words */
550+
__be32 buf1_base; /* Base addr of first buffer area */
551+
__be32 buf1_size; /* Size of buf1 area in DSP words */
552+
__be32 buf2_base; /* Base addr of 2nd buffer area */
553+
__be32 buf1_buf2_size; /* Size of buf1+buf2 in DSP words */
554+
__be32 buf3_base; /* Base addr of buf3 area */
555+
__be32 buf_total_size; /* Size of buf1+buf2+buf3 in DSP words */
556556
__be32 high_water_mark; /* Point at which IRQ is asserted */
557557
__be32 irq_count; /* bits 1-31 count IRQ assertions */
558558
__be32 irq_ack; /* acked IRQ count, bit 0 enables IRQ */
@@ -629,18 +629,18 @@ struct wm_adsp_buffer_region_def {
629629
static const struct wm_adsp_buffer_region_def default_regions[] = {
630630
{
631631
.mem_type = WMFW_ADSP2_XM,
632-
.base_offset = HOST_BUFFER_FIELD(X_buf_base),
633-
.size_offset = HOST_BUFFER_FIELD(X_buf_size),
632+
.base_offset = HOST_BUFFER_FIELD(buf1_base),
633+
.size_offset = HOST_BUFFER_FIELD(buf1_size),
634634
},
635635
{
636636
.mem_type = WMFW_ADSP2_XM,
637-
.base_offset = HOST_BUFFER_FIELD(X_buf_base2),
638-
.size_offset = HOST_BUFFER_FIELD(X_buf_brk),
637+
.base_offset = HOST_BUFFER_FIELD(buf2_base),
638+
.size_offset = HOST_BUFFER_FIELD(buf1_buf2_size),
639639
},
640640
{
641641
.mem_type = WMFW_ADSP2_YM,
642-
.base_offset = HOST_BUFFER_FIELD(Y_buf_base),
643-
.size_offset = HOST_BUFFER_FIELD(wrap),
642+
.base_offset = HOST_BUFFER_FIELD(buf3_base),
643+
.size_offset = HOST_BUFFER_FIELD(buf_total_size),
644644
},
645645
};
646646

0 commit comments

Comments
 (0)