mailman.alsa-project.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Sound-open-firmware

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
sound-open-firmware@alsa-project.org

  • 4 participants
  • 1568 discussions
[Sound-open-firmware] [PATCH] configure: reset build count every time autogen.sh is run.
by Liam Girdwood 30 Nov '17

30 Nov '17
autogen.sh rebuilds the build system so also reset any build count to 0. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- autogen.sh | 1 + configure.ac | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index 3b379b6..e0ce846 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,5 @@ #!/bin/bash +rm -f .build libtoolize -c --force aclocal -I m4 --install autoconf -Wall diff --git a/configure.ac b/configure.ac index e8c8edf..f51849b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,5 @@ - AC_PREREQ([2.69]) -AC_INIT([Reef],[m4_esyscmd(./git-version.sh), m4_esyscmd(rm -f .build)],[sound-open-firmware(a)alsa-project.org]) +AC_INIT([Reef],[m4_esyscmd(./git-version.sh)],[sound-open-firmware(a)alsa-project.org]) AC_CONFIG_SRCDIR([src/init/init.c]) AC_CONFIG_HEADERS([src/include/config.h]) AC_CONFIG_MACRO_DIRS([m4]) -- 2.14.1
2 6
0 0
[Sound-open-firmware] [PATCH] Add support to replace stale stream/trace position updates.
by yan.wang@linux.intel.com 23 Nov '17

23 Nov '17
From: Yan Wang <yan.wang(a)linux.intel.com> 1. Add "replace" parameter for ipc_queue_host_message() to indicate whether check duplicate message in host message queue. 2. Add msg_find() to search duplicate message. 3. If replace flag is true, search and replace duplicate message. 4. For the message of host offset of DMA trace, enable replace logic. It will avoid that the host message queue is full because there is too many IPC messages of host offset of DMA trace. Signed-off-by: Yan Wang <yan.wang(a)linux.intel.com> --- src/include/reef/ipc.h | 2 +- src/ipc/intel-ipc.c | 45 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/src/include/reef/ipc.h b/src/include/reef/ipc.h index fcab45b..bb814be 100644 --- a/src/include/reef/ipc.h +++ b/src/include/reef/ipc.h @@ -125,7 +125,7 @@ int ipc_stream_send_xrun(struct comp_dev *cdev, int ipc_queue_host_message(struct ipc *ipc, uint32_t header, void *tx_data, size_t tx_bytes, void *rx_data, - size_t rx_bytes, void (*cb)(void*, void*), void *cb_data); + size_t rx_bytes, void (*cb)(void*, void*), void *cb_data, uint32_t replace); int ipc_send_short_msg(uint32_t msg); void ipc_platform_do_cmd(struct ipc *ipc); diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c index e13b541..391907e 100644 --- a/src/ipc/intel-ipc.c +++ b/src/ipc/intel-ipc.c @@ -367,7 +367,7 @@ int ipc_stream_send_position(struct comp_dev *cdev, posn->comp_id = cdev->comp.id; return ipc_queue_host_message(_ipc, posn->rhdr.hdr.cmd, posn, - sizeof(*posn), NULL, 0, NULL, NULL); + sizeof(*posn), NULL, 0, NULL, NULL, 0); } /* send stream position TODO: send compound message */ @@ -379,7 +379,7 @@ int ipc_stream_send_xrun(struct comp_dev *cdev, posn->comp_id = cdev->comp.id; return ipc_queue_host_message(_ipc, posn->rhdr.hdr.cmd, posn, - sizeof(*posn), NULL, 0, NULL, NULL); + sizeof(*posn), NULL, 0, NULL, NULL, 0); } static int ipc_stream_trigger(uint32_t header) @@ -644,7 +644,7 @@ int ipc_dma_trace_send_position(void) posn.rhdr.hdr.size = sizeof(posn); return ipc_queue_host_message(_ipc, posn.rhdr.hdr.cmd, &posn, - sizeof(posn), NULL, 0, NULL, NULL); + sizeof(posn), NULL, 0, NULL, NULL, 1); } static int ipc_glb_debug_message(uint32_t header) @@ -899,19 +899,40 @@ static inline struct ipc_msg *msg_get_empty(struct ipc *ipc) return msg; } +static inline struct ipc_msg *msg_find(struct ipc *ipc, uint32_t header) +{ + struct list_item *plist; + struct ipc_msg *msg = NULL; + + list_for_item(plist, &ipc->msg_list) { + msg = container_of(plist, struct ipc_msg, list); + if (msg->header == header) + return msg; + } + + return NULL; +} int ipc_queue_host_message(struct ipc *ipc, uint32_t header, void *tx_data, size_t tx_bytes, void *rx_data, - size_t rx_bytes, void (*cb)(void*, void*), void *cb_data) + size_t rx_bytes, void (*cb)(void*, void*), void *cb_data, uint32_t replace) { - struct ipc_msg *msg; - uint32_t flags; + struct ipc_msg *msg = NULL; + uint32_t flags, found = 0; int ret = 0; spin_lock_irq(&ipc->lock, flags); - /* get a free message */ - msg = msg_get_empty(ipc); + /* do we need to replace an existing message? */ + if (replace) + msg = msg_find(ipc, header); + + /* do we need to use a new empty message? */ + if (msg) + found = 1; + else + msg = msg_get_empty(ipc); + if (msg == NULL) { trace_ipc_error("eQb"); ret = -EBUSY; @@ -929,9 +950,11 @@ int ipc_queue_host_message(struct ipc *ipc, uint32_t header, if (tx_bytes > 0 && tx_bytes < SOF_IPC_MSG_MAX_SIZE) rmemcpy(msg->tx_data, tx_data, tx_bytes); - /* now queue the message */ - ipc->dsp_pending = 1; - list_item_append(&msg->list, &ipc->msg_list); + if (!found) { + /* now queue the message */ + ipc->dsp_pending = 1; + list_item_append(&msg->list, &ipc->msg_list); + } out: spin_unlock_irq(&ipc->lock, flags); -- 2.7.4
4 5
0 0
[Sound-open-firmware] [PATCH 1/2] SRC: Bug fix for handling a deleted conversion
by Seppo Ingalsuo 21 Nov '17

21 Nov '17
This patch fixes a regression that caused SRC to try to initialize for a mode that has been disabled from in/out rates matrix. The feature exist to save tables RAM with modes those are not required. The bug caused a divide by zero to happen in src_buffer_lengths() function. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo(a)linux.intel.com> --- src/audio/src_core.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/audio/src_core.c b/src/audio/src_core.c index dc22772..d8b9a3d 100644 --- a/src/audio/src_core.c +++ b/src/audio/src_core.c @@ -133,7 +133,6 @@ int src_buffer_lengths(struct src_param *a, int fs_in, int fs_out, int nch, { struct src_stage *stage1; struct src_stage *stage2; - int k; int q; int den; int num; @@ -149,18 +148,25 @@ int src_buffer_lengths(struct src_param *a, int fs_in, int fs_out, int nch, a->idx_in = src_find_fs(src_in_fs, NUM_IN_FS, fs_in); a->idx_out = src_find_fs(src_out_fs, NUM_OUT_FS, fs_out); - /* Set blk_in, blk_out so that the muted fallback SRC keeps - * just source & sink in sync in pipeline without drift. - */ + /* Check that both in and out rates are supported */ if ((a->idx_in < 0) || (a->idx_out < 0)) { - k = gcd(fs_in, fs_out); - a->blk_in = fs_in / k; - a->blk_out = fs_out / k; + trace_src_error("us1"); + tracev_value(fs_in); + tracev_value(fs_out); return -EINVAL; } stage1 = src_table1[a->idx_out][a->idx_in]; stage2 = src_table2[a->idx_out][a->idx_in]; + + /* Check from stage1 parameter for a deleted in/out rate combination.*/ + if (stage1->filter_length < 1) { + trace_src_error("us2"); + tracev_value(fs_in); + tracev_value(fs_out); + return -EINVAL; + } + a->fir_s1 = nch * src_fir_delay_length(stage1); a->out_s1 = nch * src_out_delay_length(stage1); -- 2.11.0
2 3
0 0
[Sound-open-firmware] [PATCH] dma: dw-dma: release spinlock in error path
by Liam Girdwood 17 Nov '17

17 Nov '17
Currently not released on any configuration errors. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/drivers/dw-dma.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index 7b97fb8..4a4a14a 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -438,6 +438,7 @@ static int dw_dma_set_config(struct dma *dma, int channel, struct dw_lli2 *lli_desc_tail; uint32_t desc_count = 0; uint32_t flags; + int ret = 0; spin_lock_irq(&dma->lock, flags); @@ -453,8 +454,9 @@ static int dw_dma_set_config(struct dma *dma, int channel, desc_count++; if (desc_count == 0) { - trace_dma_error("eDC"); - return -EINVAL; + trace_dma_error("eD0"); + ret = -EINVAL; + goto out; } /* do we need to realloc descriptors */ @@ -468,8 +470,9 @@ static int dw_dma_set_config(struct dma *dma, int channel, p->chan[channel].lli = rzalloc(RZONE_RUNTIME, RFLAGS_NONE, sizeof(struct dw_lli2) * p->chan[channel].desc_count); if (p->chan[channel].lli == NULL) { - trace_dma_error("eDm"); - return -ENOMEM; + trace_dma_error("eD1"); + ret = -ENOMEM; + goto out; } } @@ -539,14 +542,17 @@ static int dw_dma_set_config(struct dma *dma, int channel, lli_desc->dar = (uint32_t)sg_elem->dest; break; default: - trace_dma_error("eDD"); - break; + trace_dma_error("eD4"); + ret = -EINVAL; + goto out; } if (sg_elem->size > DW_CTLH_BLOCK_TS_MASK) { - trace_dma_error("eDS"); - return -EINVAL; + trace_dma_error("eD5"); + ret = -EINVAL; + goto out; } + /* set transfer size of element */ #if defined CONFIG_BAYTRAIL || defined CONFIG_CHERRYTRAIL lli_desc->ctrl_hi = DW_CTLH_CLASS(p->class) | @@ -578,9 +584,9 @@ static int dw_dma_set_config(struct dma *dma, int channel, } p->chan[channel].status = COMP_STATE_PREPARE; +out: spin_unlock_irq(&dma->lock, flags); - - return 0; + return ret; } /* restore DMA conext after leaving D3 */ -- 2.11.0
1 3
0 0
[Sound-open-firmware] [PATCH] scheduler: Allow tasks to be scheduled when DSP enters idle state
by Liam Girdwood 17 Nov '17

17 Nov '17
Add an API to allow tasks to be added to the scheduler task list but not run until the DSP enters an idle state. i.e. we schedule the task as normal but dont immediately call schedule() to schedule that task for execution and instead wait until schedule() is next called (at the end of some other work). This patch also calls schedule() before entering the idle state in the main processing loop. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/include/reef/schedule.h | 2 ++ src/lib/schedule.c | 49 ++++++++++++++++++++++++++++++++++----------- src/tasks/audio.c | 3 +++ 3 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/include/reef/schedule.h b/src/include/reef/schedule.h index 6d94788..68aa0ad 100644 --- a/src/include/reef/schedule.h +++ b/src/include/reef/schedule.h @@ -77,6 +77,8 @@ void schedule(void); void schedule_task(struct task *task, uint64_t start, uint64_t deadline); +void schedule_task_idle(struct task *task, uint64_t deadline); + void schedule_task_complete(struct task *task); static inline void schedule_task_init(struct task *task, void (*func)(void *), diff --git a/src/lib/schedule.c b/src/lib/schedule.c index 942067c..1310e83 100644 --- a/src/lib/schedule.c +++ b/src/lib/schedule.c @@ -233,15 +233,8 @@ out: } #endif -/* - * Add a new task to the scheduler to be run and define a scheduling - * window in time for the task to be ran. i.e. task will run between start and - * deadline times. - * - * start is in microseconds relative to last task start time. - * deadline is in microseconds relative to start. - */ -void schedule_task(struct task *task, uint64_t start, uint64_t deadline) + +static int _schedule_task(struct task *task, uint64_t start, uint64_t deadline) { uint32_t flags; uint64_t current; @@ -254,7 +247,7 @@ void schedule_task(struct task *task, uint64_t start, uint64_t deadline) if (task->state == TASK_STATE_RUNNING) { trace_pipe("tsk"); spin_unlock_irq(&sch->lock, flags); - return; + return 0; } /* get the current time */ @@ -275,8 +268,40 @@ void schedule_task(struct task *task, uint64_t start, uint64_t deadline) task->state = TASK_STATE_QUEUED; spin_unlock_irq(&sch->lock, flags); - /* rerun scheduler */ - schedule(); + return 1; +} + +/* + * Add a new task to the scheduler to be run and define a scheduling + * deadline in time for the task to be ran. Do not invoke the scheduler + * immediately to run task, but wait intil schedule is next called. + * + * deadline is in microseconds relative to start. + */ +void schedule_task_idle(struct task *task, uint64_t deadline) +{ + _schedule_task(task, 0, deadline); +} + +/* + * Add a new task to the scheduler to be run and define a scheduling + * window in time for the task to be ran. i.e. task will run between start and + * deadline times. + * + * start is in microseconds relative to last task start time. + * deadline is in microseconds relative to start. + */ +void schedule_task(struct task *task, uint64_t start, uint64_t deadline) +{ + int need_sched; + + need_sched = _schedule_task(task, start, deadline); + + /* need to run scheduler if task not already running */ + if (need_sched) { + /* rerun scheduler */ + schedule(); + } } /* Remove a task from the scheduler when complete */ diff --git a/src/tasks/audio.c b/src/tasks/audio.c index 68f7702..af241d7 100644 --- a/src/tasks/audio.c +++ b/src/tasks/audio.c @@ -85,6 +85,9 @@ int do_task(struct reef *reef) /* now process any IPC messages from host */ ipc_process_msg_queue(); + + /* schedule any idle taks */ + schedule(); } /* something bad happened */ -- 2.11.0
2 9
0 0
[Sound-open-firmware] [PATCH] volume: fix copy size incorrect issue
by Keyon Jie 16 Nov '17

16 Nov '17
The copy sizes for src and sink may be different, here add fix to handle it. Signed-off-by: Keyon Jie <yang.jie(a)linux.intel.com> --- src/audio/volume.c | 38 +++++++++++++++++++++++++++++--------- src/include/reef/audio/buffer.h | 19 +++++++++++++++++++ 2 files changed, 48 insertions(+), 9 deletions(-) diff --git a/src/audio/volume.c b/src/audio/volume.c index 415a853..9cf766b 100644 --- a/src/audio/volume.c +++ b/src/audio/volume.c @@ -535,13 +535,27 @@ static int volume_cmd(struct comp_dev *dev, int cmd, void *data) } } +static uint32_t get_frame_bytes(enum sof_ipc_frame frame_fmt, uint32_t chan) +{ + switch (frame_fmt) { + case SOF_IPC_FRAME_S16_LE: + return 2 * chan; + case SOF_IPC_FRAME_S24_4LE: + case SOF_IPC_FRAME_S32_LE: + return 4 * chan; + default: + return 0; + } +} + /* copy and process stream data from source to sink buffers */ static int volume_copy(struct comp_dev *dev) { struct comp_data *cd = comp_get_drvdata(dev); struct comp_buffer *sink; struct comp_buffer *source; - uint32_t copy_bytes; + uint32_t copy_src_bytes, copy_sink_bytes; + uint32_t copy_frames, src_frame_bytes, sink_frame_bytes; tracev_volume("cpy"); @@ -549,16 +563,22 @@ static int volume_copy(struct comp_dev *dev) source = list_first_item(&dev->bsource_list, struct comp_buffer, sink_list); sink = list_first_item(&dev->bsink_list, struct comp_buffer, source_list); + src_frame_bytes = get_frame_bytes(cd->source_format, dev->params.channels); + sink_frame_bytes = get_frame_bytes(cd->sink_format, dev->params.channels); + /* get max number of bytes that can be copied */ - copy_bytes = comp_buffer_get_copy_bytes(dev, source, sink); + copy_frames = comp_buffer_get_copy_frames(source, src_frame_bytes, + sink, sink_frame_bytes); + copy_src_bytes = copy_frames * src_frame_bytes; + copy_sink_bytes = copy_frames * sink_frame_bytes; /* Run volume if buffers have enough room */ - if (copy_bytes < cd->source_period_bytes) { - comp_underrun(dev, source, copy_bytes, cd->source_period_bytes); + if (copy_src_bytes < cd->source_period_bytes) { + comp_underrun(dev, source, copy_src_bytes, cd->source_period_bytes); return 0; } - if (copy_bytes < cd->sink_period_bytes) { - comp_overrun(dev, sink, copy_bytes, cd->sink_period_bytes); + if (copy_sink_bytes < cd->sink_period_bytes) { + comp_overrun(dev, sink, copy_sink_bytes, cd->sink_period_bytes); return 0; } @@ -566,10 +586,10 @@ static int volume_copy(struct comp_dev *dev) cd->scale_vol(dev, sink, source, dev->frames); /* calc new free and available */ - comp_update_buffer_produce(sink, cd->sink_period_bytes); - comp_update_buffer_consume(source, cd->source_period_bytes); + comp_update_buffer_produce(sink, copy_sink_bytes); + comp_update_buffer_consume(source, copy_src_bytes); - return dev->frames; + return copy_frames; } /* diff --git a/src/include/reef/audio/buffer.h b/src/include/reef/audio/buffer.h index d1d0869..45aa3ce 100644 --- a/src/include/reef/audio/buffer.h +++ b/src/include/reef/audio/buffer.h @@ -164,6 +164,25 @@ static inline uint32_t comp_buffer_get_copy_bytes(struct comp_dev *dev, return copy_bytes; } +/* get the max number of frames that can be copied between sink and source */ +static inline uint32_t comp_buffer_get_copy_frames + (struct comp_buffer *source, uint32_t source_frame_bytes, + struct comp_buffer *sink, uint32_t sink_frame_bytes) +{ + uint32_t copy_frames, src_avail_frames, sink_free_frames; + + src_avail_frames = source->avail / source_frame_bytes; + sink_free_frames = sink->free / sink_frame_bytes; + + /* Check that source has enough frames available and sink + * has enough free frames. + */ + copy_frames = src_avail_frames > sink_free_frames ? + sink_free_frames : src_avail_frames; + + return copy_frames; +} + static inline void buffer_reset_pos(struct comp_buffer *buffer) { buffer->r_ptr = buffer->addr; -- 2.11.0
2 1
0 0
[Sound-open-firmware] [PATCH] volume: fix frame bytes calculation.
by Liam Girdwood 16 Nov '17

16 Nov '17
Currently frame bytes is calculated as period bytes. Fix. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/audio/volume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/volume.c b/src/audio/volume.c index fb8d9e7..b6872a7 100644 --- a/src/audio/volume.c +++ b/src/audio/volume.c @@ -656,7 +656,7 @@ static int volume_prepare(struct comp_dev *dev) break; } - dev->frame_bytes = cd->sink_period_bytes; + dev->frame_bytes = cd->sink_period_bytes / dev->frames; /* set downstream buffer size */ ret = buffer_set_size(sinkb, cd->sink_period_bytes * -- 1.9.1
2 2
0 0
[Sound-open-firmware] [PATCH v3] intel-ipc: fix host ring buffer size not page aligned issue
by Keyon Jie 16 Nov '17

16 Nov '17
The host ring buffer size may be not page aligned, but the last page was utilized by host component wrongly, which may introduce beating noise. Here change to correct size for the last element, which will fix the issue. Signed-off-by: Keyon Jie <yang.jie(a)linux.intel.com> --- src/ipc/intel-ipc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c index 56bd8ba..e13b541 100644 --- a/src/ipc/intel-ipc.c +++ b/src/ipc/intel-ipc.c @@ -175,6 +175,17 @@ static int parse_page_descriptors(struct intel_ipc_data *iipc, host = (struct sof_ipc_comp_host *)&cd->comp; } + /* the ring size may be not multiple of the page size, the last + * page may be not full used. The used size should be in range + * of (ring->pages - 1, ring->pages] * PAGES. + */ + if ((ring->size <= HOST_PAGE_SIZE * (ring->pages - 1)) || + (ring->size > HOST_PAGE_SIZE * ring->pages)) { + /* error buffer size */ + trace_ipc_error("eBs"); + return -EINVAL; + } + for (i = 0; i < ring->pages; i++) { idx = (((i << 2) + i)) >> 1; @@ -192,6 +203,10 @@ static int parse_page_descriptors(struct intel_ipc_data *iipc, else elem.dest = phy_addr; + /* the last page may be not full used */ + if (i == (ring->pages - 1)) + elem.size = ring->size - HOST_PAGE_SIZE * i; + if (is_trace) err = dma_trace_host_buffer(d, &elem, ring->size); else -- 2.11.0
2 1
0 0
[Sound-open-firmware] [PATCH v2] intel-ipc: fix host ring buffer size not page aligned issue
by Keyon Jie 16 Nov '17

16 Nov '17
The host ring buffer size may be not page aligned, but the last page was utilized by host component wrongly, which may introduce beating noise. Here change to correct size for the last element, which will fix the issue. Signed-off-by: Keyon Jie <yang.jie(a)linux.intel.com> --- src/ipc/intel-ipc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c index 56bd8ba..7de533a 100644 --- a/src/ipc/intel-ipc.c +++ b/src/ipc/intel-ipc.c @@ -175,6 +175,12 @@ static int parse_page_descriptors(struct intel_ipc_data *iipc, host = (struct sof_ipc_comp_host *)&cd->comp; } + if (HOST_PAGE_SIZE * ring->pages < ring->size) { + /* host side passed in error ring buffer size */ + trace_ipc_error("eBs"); + return -EINVAL; + } + for (i = 0; i < ring->pages; i++) { idx = (((i << 2) + i)) >> 1; @@ -192,6 +198,10 @@ static int parse_page_descriptors(struct intel_ipc_data *iipc, else elem.dest = phy_addr; + /* the last page may be not full used */ + if (i == (ring->pages - 1)) + elem.size = ring->size - HOST_PAGE_SIZE * i; + if (is_trace) err = dma_trace_host_buffer(d, &elem, ring->size); else -- 2.11.0
4 4
0 0
[Sound-open-firmware] [PATCH] ipc: buffer: Add HDA stream tag to stream parameters.
by Liam Girdwood 15 Nov '17

15 Nov '17
Add the HDA stream tag to the IPC stream parameters. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/include/uapi/ipc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/uapi/ipc.h b/src/include/uapi/ipc.h index 35c87eb..dc35035 100644 --- a/src/include/uapi/ipc.h +++ b/src/include/uapi/ipc.h @@ -359,6 +359,7 @@ struct sof_ipc_stream_params { enum sof_ipc_stream_direction direction; enum sof_ipc_frame frame_fmt; enum sof_ipc_buffer_format buffer_fmt; + uint32_t stream_tag; uint32_t rate; uint32_t channels; uint32_t sample_valid_bytes; -- 1.9.1
1 1
0 0
  • ← Newer
  • 1
  • ...
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • ...
  • 157
  • Older →

HyperKitty Powered by HyperKitty version 1.3.8.