ASoC: Intel: Make ADSP memory block allocation more generic
Subsystems (3)
Liam Girdwood
maintainerPATCH 1/7 ASoC: Intel: Make ADSP memory block allocation more generic
Current block allocation is tied to block type and requestor type. Make the allocation more generic by removing the struct module parameter and adding a generic block allocator structure. Also pass in the list that the blocks have to be added too in order to remove dependence on block requestor type.
--- sound/soc/intel/sst-baytrail-dsp.c | 24 ++- sound/soc/intel/sst-dsp-priv.h | 83 +++++----- sound/soc/intel/sst-firmware.c | 317 +++++++++++++++++++++++++------------ sound/soc/intel/sst-haswell-dsp.c | 41 ++--- 4 files changed, 288 insertions(+), 177 deletions(-)
sound/soc/intel/sst-baytrail-dsp.c +9 -15
@@ -67,17 +67,12 @@ static int sst_byt_parse_module(struct sst_dsp *dsp, struct sst_fw *fw, {struct dma_block_info *block;struct sst_module *mod; -struct sst_module_data block_data;struct sst_module_template template;int count;memset (&template,0 ,sizeof (template)); template.id = module->type; template.entry = module->entry_point; - template.p.type =SST_MEM_DRAM ; - template.p.data_type =SST_DATA_P ; - template.s.type =SST_MEM_DRAM ; - template.s.data_type =SST_DATA_S ; mod =sst_module_new (fw, &template,NULL );if (mod ==NULL )
@@ -94,19 +89,19 @@ static int sst_byt_parse_module(struct sst_dsp *dsp, struct sst_fw *fw,switch (block->type) {case SST_BYT_IRAM : - block_data.offset = block->ram_offset + + mod->offset = block->ram_offset + dsp->addr.iram_offset; - block_data.type =SST_MEM_IRAM ; + mod->type =SST_MEM_IRAM ;break ;case SST_BYT_DRAM : - block_data.offset = block->ram_offset + + mod->offset = block->ram_offset + dsp->addr.dram_offset; - block_data.type =SST_MEM_DRAM ; + mod->type =SST_MEM_DRAM ;break ;case SST_BYT_CACHE : - block_data.offset = block->ram_offset + + mod->offset = block->ram_offset + (dsp->addr.fw_ext - dsp->addr.lpe); - block_data.type =SST_MEM_CACHE ; + mod->type =SST_MEM_CACHE ;break ;default : dev_err(dsp->dev, "wrong ram type 0x%x in block0x%x\n",
@@ -114,11 +109,10 @@ static int sst_byt_parse_module(struct sst_dsp *dsp, struct sst_fw *fw,return -EINVAL ; } - block_data.size = block->size; - block_data.data_type =SST_DATA_M ; - block_data.data = (void *)block +sizeof (*block); + mod->size = block->size; + mod->data = (void *)block +sizeof (*block); -sst_module_insert_fixed_block (mod, &block_data); +sst_module_alloc_blocks (mod); block = (void *)block +sizeof (*block) + block->size; }
sound/soc/intel/sst-dsp-priv.h +44 -39
139 lines not on this page · raw message
sound/soc/intel/sst-firmware.c +214 -103
480 lines not on this page · raw message
sound/soc/intel/sst-haswell-dsp.c +21 -20
77 lines not on this page · raw message
Signature · 1 line
1.9.1
Liam Girdwood
maintainerPATCH 2/7 ASoC: Intel: update scratch allocator to use generic block allocator
Update the scratch allocator to use the generic block allocator and calculate total scratch buffer size.
--- sound/soc/intel/sst-dsp-priv.h | 15 ++++--- sound/soc/intel/sst-dsp.c | 1 + sound/soc/intel/sst-firmware.c | 87 +++++++++++++++++---------------------- sound/soc/intel/sst-haswell-dsp.c | 10 +---- sound/soc/intel/sst-haswell-ipc.c | 6 --- sound/soc/intel/sst-haswell-ipc.h | 2 - 6 files changed, 51 insertions(+), 70 deletions(-)
sound/soc/intel/sst-dsp-priv.h +10 -5
@@ -257,6 +257,11 @@ struct sst_dsp {struct list_head module_list;struct list_head fw_list; +/* scratch buffer */ +struct list_head scratch_block_list; +u32 scratch_offset; +u32 scratch_size; +/* platform data */ struct sst_pdata *pdata;
@@ -296,11 +301,6 @@ struct sst_module *sst_module_new(struct sst_fw *sst_fw, struct sst_module_template *template, void *private);void sst_module_free (struct sst_module *module);struct sst_module *sst_module_get_from_id (struct sst_dsp *dsp,u32 id); - -/* allocate/free pesistent/scratch memory regions managed by drv */ -struct sst_module *sst_mem_block_alloc_scratch (struct sst_dsp *dsp); -void sst_mem_block_free_scratch (struct sst_dsp *dsp, -struct sst_module *scratch);int sst_module_alloc_blocks (struct sst_module *module);int sst_module_free_blocks (struct sst_module *module);
@@ -308,6 +308,11 @@ int sst_module_free_blocks(struct sst_module *module);int sst_alloc_blocks (struct sst_dsp *dsp,struct sst_block_allocator *ba,struct list_head *block_list);int sst_free_blocks (struct sst_dsp *dsp,struct list_head *block_list); + +/* scratch allocation */ +int sst_block_alloc_scratch (struct sst_dsp *dsp); +void sst_block_free_scratch (struct sst_dsp *dsp); +/* Register the DSPs memory blocks - would be nice to read from ACPI */ struct sst_mem_block *sst_mem_block_register(struct sst_dsp *dsp, u32 offset, u32 size, enum sst_mem_type type, struct sst_block_ops *ops, u32 index,
sound/soc/intel/sst-dsp.c +1 -0
@@ -352,6 +352,7 @@ struct sst_dsp *sst_dsp_new(struct device *dev,INIT_LIST_HEAD (&sst->free_block_list);INIT_LIST_HEAD (&sst->module_list);INIT_LIST_HEAD (&sst->fw_list); +INIT_LIST_HEAD (&sst->scratch_block_list);/* Initialise SST Audio DSP */ if (sst->ops->init) {
sound/soc/intel/sst-firmware.c +38 -49
118 lines not on this page · raw message
sound/soc/intel/sst-haswell-dsp.c +2 -8
@@ -172,10 +172,8 @@ static int hsw_parse_module(struct sst_dsp *dsp, struct sst_fw *fw,static int hsw_parse_fw_image (struct sst_fw *sst_fw) {struct fw_header *header; -struct sst_module *scratch;struct fw_module_header *module;struct sst_dsp *dsp = sst_fw->dsp; -struct sst_hsw *hsw = sst_fw->private;int ret, count;/* Read the header information from the data pointer */
@@ -205,12 +203,8 @@ static int hsw_parse_fw_image(struct sst_fw *sst_fw) module = (void *)module +sizeof (*module) + module->mod_size; } -/* allocate persistent/scratch mem regions */ - scratch =sst_mem_block_alloc_scratch (dsp); -if (scratch ==NULL ) -return -ENOMEM ; - -sst_hsw_set_scratch_module (hsw, scratch); +/* allocate scratch mem regions */ +sst_block_alloc_scratch (dsp);return 0 ; }
sound/soc/intel/sst-haswell-ipc.c +0 -6
@@ -1718,12 +1718,6 @@ static int msg_empty_list_init(struct sst_hsw *hsw)return 0 ; } -void sst_hsw_set_scratch_module (struct sst_hsw *hsw, -struct sst_module *scratch) -{ - hsw->scratch = scratch; -} -struct sst_dsp *sst_hsw_get_dsp (struct sst_hsw *hsw) {return hsw->dsp;
sound/soc/intel/sst-haswell-ipc.h +0 -2
@@ -486,7 +486,5 @@ int sst_hsw_dx_get_state(struct sst_hsw *hsw, u32 item,int sst_hsw_dsp_init (struct device *dev,struct sst_pdata *pdata);void sst_hsw_dsp_free (struct device *dev,struct sst_pdata *pdata);struct sst_dsp *sst_hsw_get_dsp (struct sst_hsw *hsw); -void sst_hsw_set_scratch_module (struct sst_hsw *hsw, -struct sst_module *scratch);#endif
Signature · 1 line
1.9.1
Liam Girdwood
maintainerPATCH 3/7 ASoC: Intel: Add call to calculate offsets internally within the DSP.
In reply to Liam GirdwoodA call to calculate internal DSP memory addresses used to allocate persistent and scartch buffers.
--- sound/soc/intel/sst-dsp-priv.h | 7 +++++++ sound/soc/intel/sst-firmware.c | 22 +++++++++++++++++++--- sound/soc/intel/sst-haswell-dsp.c | 8 ++++++++ 3 files changed, 34 insertions(+), 3 deletions(-)
sound/soc/intel/sst-dsp-priv.h +7 -0
@@ -26,6 +26,9 @@ struct sst_mem_block;struct sst_module ;struct sst_fw ; +/* do we need to remove or keep */ +#define DSP_DRAM_ADDR_OFFSET 0x400000 +/* * DSP Operations exported by platform Audio DSP driver. */
@@ -67,6 +70,8 @@ struct sst_addr {u32 shim_offset;u32 iram_offset;u32 dram_offset; +u32 dsp_iram_offset; +u32 dsp_dram_offset;void __iomem *lpe;void __iomem *shim;void __iomem *pci_cfg;
@@ -319,4 +324,6 @@ struct sst_mem_block *sst_mem_block_register(struct sst_dsp *dsp, u32 offset, void *private);void sst_mem_block_unregister_all (struct sst_dsp *dsp); +u32 sst_dsp_get_offset (struct sst_dsp *dsp,u32 offset, +enum sst_mem_type type);#endif
sound/soc/intel/sst-firmware.c +19 -3
@@ -234,9 +234,8 @@ struct sst_module *sst_module_new(struct sst_fw *sst_fw, sst_module->id = template->id; sst_module->dsp = dsp; sst_module->sst_fw = sst_fw; - -memcpy (&sst_module->s, &template->s,sizeof (struct sst_module_data )); -memcpy (&sst_module->p, &template->p,sizeof (struct sst_module_data )); + sst_module->scratch_size = template->scratch_size; + sst_module->persistent_size = template->persistent_size;INIT_LIST_HEAD (&sst_module->block_list);
@@ -712,3 +711,20 @@ struct sst_module *sst_module_get_from_id(struct sst_dsp *dsp, u32 id)return NULL ; }EXPORT_SYMBOL_GPL (sst_module_get_from_id); + +/* returns block address in DSP address space */ +u32 sst_dsp_get_offset (struct sst_dsp *dsp,u32 offset, +enum sst_mem_type type) +{ +switch (type) { +case SST_MEM_IRAM : +return offset - dsp->addr.iram_offset + + dsp->addr.dsp_iram_offset; +case SST_MEM_DRAM : +return offset - dsp->addr.dram_offset + + dsp->addr.dsp_dram_offset; +default : +return 0 ; + } +} +EXPORT_SYMBOL_GPL (sst_dsp_get_offset);
sound/soc/intel/sst-haswell-dsp.c +8 -0
@@ -42,6 +42,10 @@#define SST_LP_SHIM_OFFSET 0xE7000#define SST_WPT_IRAM_OFFSET 0xA0000#define SST_LP_IRAM_OFFSET 0x80000 +#define SST_WPT_DSP_DRAM_OFFSET 0x400000 +#define SST_WPT_DSP_IRAM_OFFSET 0x00000 +#define SST_LPT_DSP_DRAM_OFFSET 0x400000 +#define SST_LPT_DSP_IRAM_OFFSET 0x00000#define SST_SHIM_PM_REG 0x84
@@ -462,12 +466,16 @@ static int hsw_init(struct sst_dsp *sst, struct sst_pdata *pdata) region = lp_region; region_count =ARRAY_SIZE (lp_region); sst->addr.iram_offset =SST_LP_IRAM_OFFSET ; + sst->addr.dsp_iram_offset =SST_LPT_DSP_IRAM_OFFSET ; + sst->addr.dsp_dram_offset =SST_LPT_DSP_DRAM_OFFSET ; sst->addr.shim_offset =SST_LP_SHIM_OFFSET ;break ;case SST_DEV_ID_WILDCAT_POINT : region = wpt_region; region_count =ARRAY_SIZE (wpt_region); sst->addr.iram_offset =SST_WPT_IRAM_OFFSET ; + sst->addr.dsp_iram_offset =SST_WPT_DSP_IRAM_OFFSET ; + sst->addr.dsp_dram_offset =SST_WPT_DSP_DRAM_OFFSET ; sst->addr.shim_offset =SST_WPT_SHIM_OFFSET ;break ;default :
Signature · 1 line
1.9.1
Liam Girdwood
maintainerPATCH 4/7 ASoC: Intel: Add runtime module support.
In reply to Liam GirdwoodAdd support for runtime module objects that can be created for every FW module that is parsed from the FW file. This gives a 1:N mapping between the FW module from file and the runtime instantiations of that module.
We also need to make sure we remove every module and runtime module when we unload the FW.
--- sound/soc/intel/sst-dsp-priv.h | 26 ++++- sound/soc/intel/sst-firmware.c | 228 ++++++++++++++++++++++++++++++++++---- sound/soc/intel/sst-haswell-ipc.c | 52 ++++++--- sound/soc/intel/sst-haswell-ipc.h | 6 + sound/soc/intel/sst-haswell-pcm.c | 56 ++++++++++ 5 files changed, 330 insertions(+), 38 deletions(-)
sound/soc/intel/sst-dsp-priv.h +25 -1
@@ -152,7 +152,7 @@ struct sst_module_runtime {int id;struct sst_module *module;/* parent module we belong too */ -u32 persistent_offset;/* private memory size */ +u32 persistent_offset;/* private memory offset */ void *private;struct list_head list;
@@ -160,6 +160,16 @@ struct sst_module_runtime { };/* +* Runtime Module Context - The runtime context must be manually stored by the +* driver prior to enter S3 and restored after leaving S3. This should really be +* part of the memory context saved by the enter D3 message IPC ??? +*/ +struct sst_module_runtime_context { +dma_addr_t dma_buffer; +u32 *buffer; +}; + +/* * Audio DSP Generic Module. * * Each Firmware file can consist of 1..N modules. A module can span multiple
@@ -309,6 +319,20 @@ struct sst_module *sst_module_get_from_id(struct sst_dsp *dsp, u32 id);int sst_module_alloc_blocks (struct sst_module *module);int sst_module_free_blocks (struct sst_module *module); +/* Create/Free firmware module runtime instances */ +struct sst_module_runtime *sst_module_runtime_new (struct sst_module *module, +int id,void *private); +void sst_module_runtime_free (struct sst_module_runtime *runtime); +struct sst_module_runtime *sst_module_runtime_get_from_id ( +struct sst_module *module,u32 id); +int sst_module_runtime_alloc_blocks (struct sst_module_runtime *runtime, +int offset); +int sst_module_runtime_free_blocks (struct sst_module_runtime *runtime); +int sst_module_runtime_save (struct sst_module_runtime *runtime, +struct sst_module_runtime_context *context); +int sst_module_runtime_restore (struct sst_module_runtime *runtime, +struct sst_module_runtime_context *context); +/* generic block allocation */ int sst_alloc_blocks (struct sst_dsp *dsp,struct sst_block_allocator *ba,struct list_head *block_list);
sound/soc/intel/sst-firmware.c +209 -19
262 lines not on this page · raw message
sound/soc/intel/sst-haswell-ipc.c +34 -18
66 lines not on this page · raw message
sound/soc/intel/sst-haswell-ipc.h +6 -0
@@ -40,6 +40,7 @@ struct sst_hsw_stream;struct sst_hsw_log_stream ;struct sst_pdata ;struct sst_module ; +struct sst_module_runtime ;extern struct sst_ops haswell_ops;/* Stream Allocate Path ID */
@@ -487,4 +488,9 @@ int sst_hsw_dsp_init(struct device *dev, struct sst_pdata *pdata);void sst_hsw_dsp_free (struct device *dev,struct sst_pdata *pdata);struct sst_dsp *sst_hsw_get_dsp (struct sst_hsw *hsw); +/* runtime module management */ +struct sst_module_runtime *sst_hsw_runtime_module_create (struct sst_hsw *hsw, +int mod_id,int offset); +void sst_hsw_runtime_module_free (struct sst_module_runtime *runtime); +#endif
sound/soc/intel/sst-haswell-pcm.c +56 -0
78 lines not on this page · raw message
Signature · 1 line
1.9.1
Liam Girdwood
maintainerPATCH 5/7 ASoC: Intel: Add DMA firmware loading support
In reply to Liam GirdwoodAdd support for DMA to load firmware modules to the DSP memory blocks. Two DMA engines are supported, DesignWare and Intel MID.
--- sound/soc/intel/sst-dsp-priv.h | 4 + sound/soc/intel/sst-dsp.c | 7 ++ sound/soc/intel/sst-dsp.h | 7 ++ sound/soc/intel/sst-firmware.c | 265 ++++++++++++++++++++++++++++++++++++++++- 4 files changed, 280 insertions(+), 3 deletions(-)
sound/soc/intel/sst-dsp-priv.h +4 -0
@@ -348,6 +348,10 @@ struct sst_mem_block *sst_mem_block_register(struct sst_dsp *dsp, u32 offset, void *private);void sst_mem_block_unregister_all (struct sst_dsp *dsp); +/* Create/Free DMA resources */ +int sst_dma_new (struct sst_dsp *sst); +void sst_dma_free (struct sst_dma *dma); +u32 sst_dsp_get_offset (struct sst_dsp *dsp,u32 offset,enum sst_mem_type type);#endif
sound/soc/intel/sst-dsp.c +7 -0
@@ -367,6 +367,10 @@ struct sst_dsp *sst_dsp_new(struct device *dev,if (err) goto irq_err; + err =sst_dma_new (sst); +if (err) +dev_warn (dev,"sst_dma_new failed %d\n" , err); +return sst; irq_err:
@@ -382,6 +386,9 @@ void sst_dsp_free(struct sst_dsp *sst)free_irq (sst->irq, sst);if (sst->ops->free) sst->ops->free (sst); + +if (sst->dma) +sst_dma_free (sst->dma); }EXPORT_SYMBOL_GPL (sst_dsp_free);
sound/soc/intel/sst-dsp.h +7 -0
@@ -245,6 +245,13 @@ void sst_memcpy_fromio_32(struct sst_dsp *sst,/* DSP reset & boot */ void sst_dsp_reset (struct sst_dsp *sst);int sst_dsp_boot (struct sst_dsp *sst); +/* DMA */ +int sst_dsp_dma_get_channel (struct sst_dsp *dsp,int chan_id); +void sst_dsp_dma_put_channel (struct sst_dsp *dsp); +int sst_dsp_dma_copyfrom (struct sst_dsp *sst,dma_addr_t dest_addr, +dma_addr_t src_addr,size_t size); +int sst_dsp_dma_copyto (struct sst_dsp *sst,dma_addr_t dest_addr, +dma_addr_t src_addr,size_t size);/* Msg IO */ void sst_dsp_ipc_msg_tx (struct sst_dsp *dsp,u32 msg);
sound/soc/intel/sst-firmware.c +262 -3
323 lines not on this page · raw message
Signature · 1 line
1.9.1
Liam Girdwood
maintainerPATCH 6/7 ASoC: Intel: Add runtime module lookup API call
In reply to Liam GirdwoodAdd an API to allow quick lookup of runtime modules based on ID.
--- sound/soc/intel/sst-firmware.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
sound/soc/intel/sst-firmware.c +20 -0
@@ -1161,6 +1161,26 @@ struct sst_module *sst_module_get_from_id(struct sst_dsp *dsp, u32 id) }EXPORT_SYMBOL_GPL (sst_module_get_from_id); +struct sst_module_runtime *sst_module_runtime_get_from_id ( +struct sst_module *module,u32 id) +{ +struct sst_module_runtime *runtime; +struct sst_dsp *dsp = module->dsp; + +mutex_lock (&dsp->mutex); + +list_for_each_entry (runtime, &module->runtime_list, list) { +if (runtime->id == id) { +mutex_unlock (&dsp->mutex); +return runtime; + } + } + +mutex_unlock (&dsp->mutex); +return NULL ; +} +EXPORT_SYMBOL_GPL (sst_module_runtime_get_from_id); +/* returns block address in DSP address space */ u32 sst_dsp_get_offset (struct sst_dsp *dsp,u32 offset,enum sst_mem_type type)
Signature · 1 line
1.9.1
Liam Girdwood
maintainerPATCH 7/7 ASoC: Intel: Provide streams with dynamic module information
In reply to Liam GirdwoodRemove the hard coded module paramaters and provide each module with dynamically generated buffer information for scratch and persistent buffers.
--- sound/soc/intel/sst-haswell-ipc.c | 54 ++++++++++++++++----------------------- sound/soc/intel/sst-haswell-ipc.h | 3 +-- sound/soc/intel/sst-haswell-pcm.c | 29 +++++---------------- 3 files changed, 29 insertions(+), 57 deletions(-)
sound/soc/intel/sst-haswell-ipc.c +22 -32
@@ -1351,10 +1351,11 @@ int sst_hsw_stream_buffer(struct sst_hsw *hsw, struct sst_hsw_stream *stream, }int sst_hsw_stream_set_module_info (struct sst_hsw *hsw, -struct sst_hsw_stream *stream,enum sst_hsw_module_id module_id, -u32 entry_point) +struct sst_hsw_stream *stream,struct sst_module_runtime *runtime) {struct sst_hsw_module_map *map = &stream->request.map; +struct sst_dsp *dsp =sst_hsw_get_dsp (hsw); +struct sst_module *module = runtime->module;if (stream->commited) {dev_err (hsw->dev,"error: stream committed for set module\n" );
@@ -1363,36 +1364,25 @@ int sst_hsw_stream_set_module_info(struct sst_hsw *hsw,/* only support initial module atm */ map->module_entries_count =1 ; - map->module_entries[0 ].module_id = module_id; - map->module_entries[0 ].entry_point = entry_point; - -return 0 ; -} - -int sst_hsw_stream_set_pmemory_info (struct sst_hsw *hsw, -struct sst_hsw_stream *stream,u32 offset,u32 size) -{ -if (stream->commited) { -dev_err (hsw->dev,"error: stream committed for set pmem\n" ); -return -EINVAL ; - } - - stream->request.persistent_mem.offset = offset; - stream->request.persistent_mem.size = size; - -return 0 ; -} - -int sst_hsw_stream_set_smemory_info (struct sst_hsw *hsw, -struct sst_hsw_stream *stream,u32 offset,u32 size) -{ -if (stream->commited) { -dev_err (hsw->dev,"error: stream committed for set smem\n" ); -return -EINVAL ; - } - - stream->request.scratch_mem.offset = offset; - stream->request.scratch_mem.size = size; + map->module_entries[0 ].module_id = module->id; + map->module_entries[0 ].entry_point = module->entry; + + stream->request.persistent_mem.offset = +sst_dsp_get_offset (dsp, runtime->persistent_offset,SST_MEM_DRAM ); + stream->request.persistent_mem.size = module->persistent_size; + + stream->request.scratch_mem.offset = +sst_dsp_get_offset (dsp, dsp->scratch_offset,SST_MEM_DRAM ); + stream->request.scratch_mem.size = dsp->scratch_size; + +dev_dbg (hsw->dev,"module %d runtime %d using:\n" , module->id, + runtime->id); +dev_dbg (hsw->dev," persistent offset 0x%x bytes 0x%x\n" , + stream->request.persistent_mem.offset, + stream->request.persistent_mem.size); +dev_dbg (hsw->dev," scratch offset 0x%x bytes 0x%x\n" , + stream->request.scratch_mem.offset, + stream->request.scratch_mem.size);return 0 ; }
sound/soc/intel/sst-haswell-ipc.h +1 -2
@@ -433,8 +433,7 @@ int sst_hsw_stream_set_map_config(struct sst_hsw *hsw,int sst_hsw_stream_set_style (struct sst_hsw *hsw,struct sst_hsw_stream *stream,enum sst_hsw_interleaving style);int sst_hsw_stream_set_module_info (struct sst_hsw *hsw, -struct sst_hsw_stream *stream,enum sst_hsw_module_id module_id, -u32 entry_point); +struct sst_hsw_stream *stream,struct sst_module_runtime *runtime);int sst_hsw_stream_set_pmemory_info (struct sst_hsw *hsw,struct sst_hsw_stream *stream,u32 offset,u32 size); int sst_hsw_stream_set_smemory_info(struct sst_hsw *hsw,
sound/soc/intel/sst-haswell-pcm.c +6 -23
@@ -105,6 +105,7 @@ struct hsw_pcm_data {unsigned int wpos;struct mutex mutex;bool allocated; +int persistent_offset; };/* private data for the driver */
@@ -478,28 +479,8 @@ static int hsw_pcm_hw_params(struct snd_pcm_substream *substream,return -EINVAL ; } -/* we use hardcoded memory offsets atm, will be updated for new FW */ -if (stream_type ==SST_HSW_STREAM_TYPE_CAPTURE ) { -sst_hsw_stream_set_module_info (hsw, pcm_data->stream, -SST_HSW_MODULE_PCM_CAPTURE , module_data->entry); -sst_hsw_stream_set_pmemory_info (hsw, pcm_data->stream, -0x449400 ,0x4000 ); -sst_hsw_stream_set_smemory_info (hsw, pcm_data->stream, -0x400000 ,0 ); - }else {/* stream_type == SST_HSW_STREAM_TYPE_SYSTEM */ -sst_hsw_stream_set_module_info (hsw, pcm_data->stream, -SST_HSW_MODULE_PCM_SYSTEM , module_data->entry); - -sst_hsw_stream_set_pmemory_info (hsw, pcm_data->stream, - module_data->offset, module_data->size); -sst_hsw_stream_set_pmemory_info (hsw, pcm_data->stream, -0x44d400 ,0x3800 ); - -sst_hsw_stream_set_smemory_info (hsw, pcm_data->stream, - module_data->offset, module_data->size); -sst_hsw_stream_set_smemory_info (hsw, pcm_data->stream, -0x400000 ,0 ); - } +sst_hsw_stream_set_module_info (hsw, pcm_data->stream, + pcm_data->runtime); ret =sst_hsw_stream_commit (hsw, pcm_data->stream);if (ret <0 ) {
@@ -679,9 +660,11 @@ static int hsw_pcm_create_modules(struct hsw_priv_data *pdata) pcm_data = &pdata->pcm[i]; pcm_data->runtime =sst_hsw_runtime_module_create (hsw, - mod_map[i].mod_id); + mod_map[i].mod_id, pcm_data->persistent_offset);if (pcm_data->runtime ==NULL ) goto err; + pcm_data->persistent_offset = + pcm_data->runtime->persistent_offset; }return 0 ;
Signature · 1 line
1.9.1
Mark Brown
maintainerQuoted 4 lines · Liam Girdwood
Current block allocation is tied to block type and requestor type. Make the allocation more generic by removing the struct module parameter and adding a generic block allocator structure. Also pass in the list that the blocks have to be added too in order to remove dependence on block requestor type.
I'm having trouble apply this - patch 1 manages to apply with some fuzz but patch 5 is failing. Probably needs refreshing against Vinod's recent changes? I applied everything up to patch 4 (ASoC: Intel: Add runtime module support).
Mark Brown
maintainerQuoted 10 lines · Mark Brown
Quoted 4 lines · Liam Girdwood
Current block allocation is tied to block type and requestor type. Make the allocation more generic by removing the struct module parameter and adding a generic block allocator structure. Also pass in the list that the blocks have to be added too in order to remove dependence on block requestor type.
I'm having trouble apply this - patch 1 manages to apply with some fuzz but patch 5 is failing. Probably needs refreshing against Vinod's recent changes? I applied everything up to patch 4 (ASoC: Intel: Add runtime module support).
I had to drop these since the 0day tester found several build errors (possibly ones that'd have been fixed when the full series was applied or conflicts with Vinod's changes).
Hi Liam
Quoted 9 lines · Mark Brown
Quoted 4 lines · Liam Girdwood
Current block allocation is tied to block type and requestor type. Make the allocation more generic by removing the struct module parameter and adding a generic block allocator structure. Also pass in the list that the blocks have to be added too in order to remove dependence on block requestor type.
I'm having trouble apply this - patch 1 manages to apply with some fuzz but patch 5 is failing. Probably needs refreshing against Vinod's recent changes? I applied everything up to patch 4 (ASoC: Intel: Add runtime module support).
For me sound.git for-next head a929d726a507 don't build anymore. I have to revert all your four recent patches cd51c82524ff -4. I guess some patch order or dependency issue since the first patch doesn't build when applied to topic/intel?
Signature · 1 line
Jarkko
Quoted 8 lines · Jarkko Nikula
Hi Liam
Quoted 5 lines · Mark Brown
Quoted 4 lines · Liam Girdwood
Current block allocation is tied to block type and requestor type. Make the allocation more generic by removing the struct module parameter and adding a generic block allocator structure. Also pass in the list that the blocks have to be added too in order to remove dependence on block requestor type.
Quoted 7 lines
Quoted 4 lines
I'm having trouble apply this - patch 1 manages to apply with some fuzz but patch 5 is failing. Probably needs refreshing against Vinod's recent changes? I applied everything up to patch 4 (ASoC: Intel: Add runtime module support).
For me sound.git for-next head
a929d726a507don't build anymore. I have to revert all your four recent patchescd51c82524ff-4. I guess some patch order or dependency issue since the first patch doesn't build when applied to topic/intel?
Ah, nevermind. Mark was dropped these already. I was building at my local copy of for-next branch before patches were dropped.
Signature · 1 line
Jarkko
Liam Girdwood
maintainerQuoted 18 lines · Jarkko Nikula
Quoted 17 lines · Jarkko Nikula
Hi Liam
Quoted 13 lines · Mark Brown
Quoted 8 lines · Liam Girdwood
Current block allocation is tied to block type and requestor type. Make the
allocation more generic by removing the struct module parameter and adding
a generic block allocator structure. Also pass in the list that the blocks
have to be added too in order to remove dependence on block requestor type.I'm having trouble apply this - patch 1 manages to apply with some fuzz but patch 5 is failing. Probably needs refreshing against Vinod's recent changes? I applied everything up to patch 4 (ASoC: Intel: Add runtime module support).
Quoted 8 lines
Quoted 5 lines
For me sound.git for-next head
a929d726a507don't build anymore. I have to revert all your four recent patchescd51c82524ff-4. I guess some patch order or dependency issue since the first patch doesn't build when applied to topic/intel?Ah, nevermind. Mark was dropped these already. I was building at my local copy of for-next branch before patches were dropped.
Yeah, it looks like it was out of sync with Vinod's latest patches so I'll resend today now that I'm back from holidays.
Liam