u32 irq_count;
        int read_index;
        int avail;
+       int host_buf_mem_type;
 };
 
 struct wm_adsp_compr {
 static inline int wm_adsp_buffer_read(struct wm_adsp_compr_buf *buf,
                                      unsigned int field_offset, u32 *data)
 {
-       return wm_adsp_read_data_word(buf->dsp, WMFW_ADSP2_XM,
+       return wm_adsp_read_data_word(buf->dsp, buf->host_buf_mem_type,
                                      buf->host_buf_ptr + field_offset, data);
 }
 
 static inline int wm_adsp_buffer_write(struct wm_adsp_compr_buf *buf,
                                       unsigned int field_offset, u32 data)
 {
-       return wm_adsp_write_data_word(buf->dsp, WMFW_ADSP2_XM,
+       return wm_adsp_write_data_word(buf->dsp, buf->host_buf_mem_type,
                                       buf->host_buf_ptr + field_offset, data);
 }
 
        if (!buf->host_buf_ptr)
                return -EIO;
 
+       buf->host_buf_mem_type = WMFW_ADSP2_XM;
+
        adsp_dbg(dsp, "host_buf_ptr=%x\n", buf->host_buf_ptr);
 
        return 0;
                if (!ctl->enabled)
                        continue;
 
+               buf->host_buf_mem_type = ctl->alg_region.type;
                return ctl;
        }