ASoc: msm: qdsp6v2: Native drivers to use different pool id.

Some physical pools ids may become unsupported in future targets.
Remove target specific information from API to make it robust against
such architectural changes.

Also different platforms such as MDM, MSM might support some physical
pools but not the other, so choosing a generic name which will could be
mapped internally to different memory pools

Change-Id: I4f003662d9a2a28c17eefa5230530b8608b26c09
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
This commit is contained in:
Harmandeep Singh 2012-06-22 15:34:45 -07:00 committed by Stephen Boyd
parent 2c89f42507
commit a9e74c693c
3 changed files with 5 additions and 5 deletions

View file

@ -433,7 +433,7 @@ int adm_memory_map_regions(int port_id,
mmap_regions->hdr.dest_port = 0;
mmap_regions->hdr.token = 0;
mmap_regions->hdr.opcode = ADM_CMD_SHARED_MEM_MAP_REGIONS;
mmap_regions->mem_pool_id = ADSP_MEMORY_MAP_EBI_POOL & 0x00ff;
mmap_regions->mem_pool_id = ADSP_MEMORY_MAP_SHMEM8_4K_POOL & 0x00ff;
mmap_regions->num_regions = bufcnt & 0x00ff;
mmap_regions->property_flag = 0x00;

View file

@ -867,7 +867,7 @@ int afe_cmd_memory_map(u32 dma_addr_p, u32 dma_buf_sz)
mregion->hdr.dest_port = 0;
mregion->hdr.token = 0;
mregion->hdr.opcode = AFE_SERVICE_CMD_SHARED_MEM_MAP_REGIONS;
mregion->mem_pool_id = ADSP_MEMORY_MAP_EBI_POOL;
mregion->mem_pool_id = ADSP_MEMORY_MAP_SHMEM8_4K_POOL;
mregion->num_regions = 1;
mregion->property_flag = 0x00;
/* Todo */
@ -946,7 +946,7 @@ int afe_cmd_memory_map_nowait(int port_id, u32 dma_addr_p, u32 dma_buf_sz)
mregion->hdr.dest_port = 0;
mregion->hdr.token = 0;
mregion->hdr.opcode = AFE_SERVICE_CMD_SHARED_MEM_MAP_REGIONS;
mregion->mem_pool_id = ADSP_MEMORY_MAP_EBI_POOL;
mregion->mem_pool_id = ADSP_MEMORY_MAP_SHMEM8_4K_POOL;
mregion->num_regions = 1;
mregion->property_flag = 0x00;

View file

@ -2265,7 +2265,7 @@ int q6asm_memory_map(struct audio_client *ac, uint32_t buf_add, int dir,
q6asm_add_mmaphdr(ac, &mmap_regions->hdr, cmd_size,
TRUE, ((ac->session << 8) | dir));
mmap_regions->hdr.opcode = ASM_CMD_SHARED_MEM_MAP_REGIONS;
mmap_regions->mem_pool_id = ADSP_MEMORY_MAP_EBI_POOL;
mmap_regions->mem_pool_id = ADSP_MEMORY_MAP_SHMEM8_4K_POOL;
mmap_regions->num_regions = bufcnt & 0x00ff;
mmap_regions->property_flag = 0x00;
payload = ((u8 *) mmap_region_cmd +
@ -2408,7 +2408,7 @@ static int q6asm_memory_map_regions(struct audio_client *ac, int dir,
mmap_regions, ((ac->session << 8) | dir));
mmap_regions->hdr.opcode = ASM_CMD_SHARED_MEM_MAP_REGIONS;
mmap_regions->mem_pool_id = ADSP_MEMORY_MAP_EBI_POOL;
mmap_regions->mem_pool_id = ADSP_MEMORY_MAP_SHMEM8_4K_POOL;
mmap_regions->num_regions = 1; /*bufcnt & 0x00ff; */
mmap_regions->property_flag = 0x00;
pr_debug("map_regions->nregions = %d\n", mmap_regions->num_regions);