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

December 2017

  • 11 participants
  • 66 discussions
[Sound-open-firmware] [PATCH] Volume: Code cleanup for minimum gain value limiting
by Seppo Ingalsuo 20 Dec '17

20 Dec '17
This patch changes the condition for limiting the smallest gain to eliminate a never executed code part when VOL_MIN is defined as zero. The variable v is unsigned integer so less than zero is not possible. The functionality is not modified by this patch. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo(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 6130563..3b3e2aa 100644 --- a/src/audio/volume.c +++ b/src/audio/volume.c @@ -427,7 +427,7 @@ static inline void volume_set_chan(struct comp_dev *dev, int chan, uint32_t vol) * multiplication overflow with the 32 bit value. Non-zero MIN option * can be useful to prevent totally muted small volume gain. */ - if (v < VOL_MIN) + if (v <= VOL_MIN) v = VOL_MIN; if (v > VOL_MAX) -- 2.11.0
2 1
0 0
[Sound-open-firmware] [PATCH] Change type of size in trace_work() callback from uint32_t to int32_t.
by yan.wang@linux.intel.com 20 Dec '17

20 Dec '17
From: Yan Wang <yan.wang(a)linux.intel.com> This variable is set by the return value of dma_copy_to_host_nowait(). Unsigned type will mislead error checking. Signed-off-by: Yan Wang <yan.wang(a)linux.intel.com> --- src/lib/dma-trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/dma-trace.c b/src/lib/dma-trace.c index ea63ab4..1fbd050 100644 --- a/src/lib/dma-trace.c +++ b/src/lib/dma-trace.c @@ -48,7 +48,7 @@ static uint64_t trace_work(void *data, uint64_t delay) struct dma_sg_config *config = &d->config; unsigned long flags; uint32_t avail = buffer->avail; - uint32_t size; + int32_t size; uint32_t hsize; uint32_t lsize; -- 2.7.4
2 1
0 0
[Sound-open-firmware] [PATCH 1/2] trace: dma: Make sure we can trace platform device initialisation.
by Liam Girdwood 19 Dec '17

19 Dec '17
Currently the trace initialisation must be performed after DMAC init has completed. This means we miss the trace output from any platform device initialisation. Split the DMA trace initialisation into two parts so the trace buffer is allocated early on and can accept messages meaning we dont miss any device initialisation trace. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/include/reef/dma-trace.h | 3 +- src/lib/dma-trace.c | 61 ++++++++++++++++------------------------ src/platform/baytrail/platform.c | 4 ++- 3 files changed, 30 insertions(+), 38 deletions(-) diff --git a/src/include/reef/dma-trace.h b/src/include/reef/dma-trace.h index 2bd115e..4b17953 100644 --- a/src/include/reef/dma-trace.h +++ b/src/include/reef/dma-trace.h @@ -64,7 +64,8 @@ struct dma_trace_data { spinlock_t lock; }; -int dma_trace_init(struct dma_trace_data *d); +int dma_trace_init_early(struct dma_trace_data *d); +int dma_trace_init_complete(struct dma_trace_data *d); int dma_trace_host_buffer(struct dma_trace_data *d, struct dma_sg_elem *elem, uint32_t host_size); int dma_trace_enable(struct dma_trace_data *d); diff --git a/src/lib/dma-trace.c b/src/lib/dma-trace.c index a147219..0dccf7e 100644 --- a/src/lib/dma-trace.c +++ b/src/lib/dma-trace.c @@ -115,12 +115,9 @@ out: return DMA_TRACE_PERIOD; } -int dma_trace_init(struct dma_trace_data *d) +int dma_trace_init_early(struct dma_trace_data *d) { struct dma_trace_buf *buffer = &d->dmatb; - int ret; - - trace_buffer("dtn"); /* allocate new buffer */ buffer->addr = rballoc(RZONE_RUNTIME, RFLAGS_NONE, DMA_TRACE_LOCAL_SIZE); @@ -129,14 +126,6 @@ int dma_trace_init(struct dma_trace_data *d) return -ENOMEM; } - /* init DMA copy context */ - ret = dma_copy_new(&d->dc, PLATFORM_TRACE_DMAC); - if (ret < 0) { - trace_buffer_error("edm"); - rfree(buffer->addr); - return ret; - } - bzero(buffer->addr, DMA_TRACE_LOCAL_SIZE); /* initialise the DMA buffer */ @@ -149,13 +138,32 @@ int dma_trace_init(struct dma_trace_data *d) d->copy_in_progress = 0; list_init(&d->config.elem_list); - work_init(&d->dmat_work, trace_work, d, WORK_ASYNC); spinlock_init(&d->lock); trace_data = d; return 0; } +int dma_trace_init_complete(struct dma_trace_data *d) +{ + struct dma_trace_buf *buffer = &d->dmatb; + int ret; + + trace_buffer("dtn"); + + /* init DMA copy context */ + ret = dma_copy_new(&d->dc, PLATFORM_TRACE_DMAC); + if (ret < 0) { + trace_buffer_error("edm"); + rfree(buffer->addr); + return ret; + } + + work_init(&d->dmat_work, trace_work, d, WORK_ASYNC); + + return 0; +} + int dma_trace_host_buffer(struct dma_trace_data *d, struct dma_sg_elem *elem, uint32_t host_size) { @@ -193,15 +201,8 @@ static void dtrace_add_event(const char *e, uint32_t length) margin = buffer->end_addr - buffer->w_ptr; - /* validate */ - if (margin <= 0) { - trace_buffer_error("emm"); - return; - } - /* check for buffer wrap */ if (margin > length) { - /* no wrap */ memcpy(buffer->w_ptr, e, length); buffer->w_ptr += length; @@ -223,15 +224,11 @@ void dtrace_event(const char *e, uint32_t length) struct dma_trace_buf *buffer = NULL; unsigned long flags; - if (trace_data == NULL || length == 0) - return; - - if (!trace_data->enabled) + if (trace_data == NULL || + length > DMA_TRACE_LOCAL_SIZE / 8 || length == 0) return; buffer = &trace_data->dmatb; - if (buffer == NULL) - return; spin_lock_irq(&trace_data->lock, flags); dtrace_add_event(e, length); @@ -253,16 +250,8 @@ void dtrace_event(const char *e, uint32_t length) void dtrace_event_atomic(const char *e, uint32_t length) { - struct dma_trace_buf *buffer = NULL; - - if (trace_data == NULL || length == 0) - return; - - if (!trace_data->enabled) - return; - - buffer = &trace_data->dmatb; - if (buffer == NULL) + if (trace_data == NULL || + length > DMA_TRACE_LOCAL_SIZE / 8 || length == 0) return; dtrace_add_event(e, length); diff --git a/src/platform/baytrail/platform.c b/src/platform/baytrail/platform.c index 12f7de5..cd884a8 100644 --- a/src/platform/baytrail/platform.c +++ b/src/platform/baytrail/platform.c @@ -297,6 +297,8 @@ int platform_init(struct reef *reef) trace_point(TRACE_BOOT_PLATFORM_IPC); ipc_init(reef); + dma_trace_init_early(&reef->ipc->dmat); + /* init DMACs */ trace_point(TRACE_BOOT_PLATFORM_DMA); dmac0 = dma_get(DMA_ID_DMAC0); @@ -359,7 +361,7 @@ int platform_init(struct reef *reef) #endif /* Initialize DMA for Trace*/ - dma_trace_init(&reef->ipc->dmat); + dma_trace_init_complete(&reef->ipc->dmat); return 0; } -- 2.14.1
1 1
0 0
[Sound-open-firmware] [PATCH] pipeline: docs: Add some comments to further document the pipeline core
by Liam Girdwood 19 Dec '17

19 Dec '17
Add more descriptive documentation to help document the pipeline core. Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/audio/pipeline.c | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/src/audio/pipeline.c b/src/audio/pipeline.c index 3cfffb6..94d91b5 100644 --- a/src/audio/pipeline.c +++ b/src/audio/pipeline.c @@ -196,6 +196,7 @@ static void disconnect_downstream(struct pipeline *p, struct comp_dev *start, static void pipeline_cmd_update(struct pipeline *p, struct comp_dev *comp, int cmd) { + /* only required by the scheduling component */ if (p->sched_comp != comp) return; @@ -345,7 +346,11 @@ int pipeline_buffer_connect(struct pipeline *p, return 0; } -/* call op on all downstream components - locks held by caller */ +/* Walk the graph downstream from start component in any pipeline and perform + * the operation on each component. Graph walk is stopped on any component + * returning an error ( < 0) and returns immediately. Components returning a + * positive error code also stop the graph walk on that branch causing the + * walk to return to a shallower level in the graph. */ static int component_op_downstream(struct op_data *op_data, struct comp_dev *start, struct comp_dev *current, struct comp_dev *previous) @@ -422,7 +427,11 @@ static int component_op_downstream(struct op_data *op_data, return err; } -/* call op on all upstream components - locks held by caller */ +/* Walk the graph upstream from start component in any pipeline and perform + * the operation on each component. Graph walk is stopped on any component + * returning an error ( < 0) and returns immediately. Components returning a + * positive error code also stop the graph walk on that branch causing the + * walk to return to a shallower level in the graph. */ static int component_op_upstream(struct op_data *op_data, struct comp_dev *start, struct comp_dev *current, struct comp_dev *previous) @@ -496,6 +505,8 @@ static int component_op_upstream(struct op_data *op_data, return err; } +/* walk the graph upstream from start component in any pipeline and prepare + * the buffer context for each inactive component */ static int component_prepare_buffers_upstream(struct comp_dev *start, struct comp_dev *current, struct comp_buffer *buffer) { @@ -534,6 +545,8 @@ static int component_prepare_buffers_upstream(struct comp_dev *start, return err; } +/* walk the graph downstream from start component in any pipeline and prepare + * the buffer context for each inactive component */ static int component_prepare_buffers_downstream(struct comp_dev *start, struct comp_dev *current, struct comp_buffer *buffer) { @@ -725,6 +738,10 @@ int pipeline_reset(struct pipeline *p, struct comp_dev *host) * end point(s) to the downstream components in a single operation. * i.e. the period data is processed from upstream end points to downstream * "comp" recursively in a single call to this function. + * + * The copy operation is for this pipeline only (as pipelines are scheduled + * individually) and it stops at pipeline endpoints (where a component has no + * source or sink components) or where this pipeline joins another pipeline. */ static int pipeline_copy_from_upstream(struct comp_dev *start, struct comp_dev *current) @@ -779,6 +796,10 @@ copy: * downstream end point component(s) in a single operation. * i.e. the period data is processed from this component to downstream * end points recursively in a single call to this function. + * + * The copy operation is for this pipeline only (as pipelines are scheduled + * individually) and it stops at pipeline endpoints (where a component has no + * source or sink components) or where this pipeline joins another pipeline. */ static int pipeline_copy_to_downstream(struct comp_dev *start, struct comp_dev *current) @@ -827,6 +848,10 @@ out: return err; } +/* walk the graph to downstream active components in any pipeline to find + * the first active DAI and return it's timestamp. + * TODO: consider pipeline with multiple DAIs + */ static int timestamp_downstream(struct comp_dev *start, struct comp_dev *current, struct sof_ipc_stream_posn *posn) { @@ -868,7 +893,10 @@ downstream: return res; } - +/* walk the graph to upstream active components in any pipeline to find + * the first active DAI and return it's timestamp. + * TODO: consider pipeline with multiple DAIs + */ static int timestamp_upstream(struct comp_dev *start, struct comp_dev *current, struct sof_ipc_stream_posn *posn) { @@ -938,7 +966,8 @@ static void xrun(struct comp_dev *dev, void *data) } -/* travel down stream from start and run func for each component of type */ +/* walk the graph downstream from start component in any pipeline and run + * function <func> for each component of type <type> */ static void pipeline_for_each_downstream(struct pipeline *p, enum sof_comp_type type, struct comp_dev *current, void (*func)(struct comp_dev *, void *), void *data) @@ -964,7 +993,8 @@ static void pipeline_for_each_downstream(struct pipeline *p, } } -/* travel up stream from start and run func for each component of type */ +/* walk the graph upstream from start component in any pipeline and run + * function <func> for each component of type <type> */ static void pipeline_for_each_upstream(struct pipeline *p, enum sof_comp_type type, struct comp_dev *current, void (*func)(struct comp_dev *, void *), void *data) -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH] lock: Add deadlock detection.
by Liam Girdwood 19 Dec '17

19 Dec '17
Add a debug option that can detect deadlock and panic(). The deadlock detection attempts to acquire a lock several times before giving up and causing a panic() taht dumps the deadlock details. Signed-off-by: Liam Girdwwod <liam.r.girdwood(a)linux.intel.com> --- src/include/reef/debug.h | 1 + src/include/reef/lock.h | 71 ++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/src/include/reef/debug.h b/src/include/reef/debug.h index 70a7802..7551fc5 100644 --- a/src/include/reef/debug.h +++ b/src/include/reef/debug.h @@ -45,6 +45,7 @@ #define PANIC_PLATFORM 4 #define PANIC_TASK 5 #define PANIC_EXCEPTION 6 +#define PANIC_DEADLOCK 7 #define DEBUG diff --git a/src/include/reef/lock.h b/src/include/reef/lock.h index deb0fb7..fd415ae 100644 --- a/src/include/reef/lock.h +++ b/src/include/reef/lock.h @@ -35,6 +35,7 @@ #define __INCLUDE_LOCK__ #define DEBUG_LOCKS 0 +#define DEBUG_LOCKS_VERBOSE 0 #include <stdint.h> #include <arch/spinlock.h> @@ -62,19 +63,33 @@ * grep -rn lock --include *.c | grep 439 * src/lib/alloc.c:439: spin_lock_irq(&memmap.lock, flags); * - * Every lock entry and exit shows LcE and LcX in trace alonside the lock + * Every lock entry and exit shows LcE and LcX in trace alongside the lock * line numbers in hex. e.g. * * 0xfd60 [11032.730567] delta [0.000004] lock LcE * 0xfd70 [11032.730569] delta [0.000002] value 0x00000000000000ae * - * Deadlock would be a LcE without a subsequent LcX. + * Deadlock can be confirmed in rmbox :- * + * Debug log: + * debug: 0x0 (00) = 0xdead0007 (-559087609) |....| + * .... + * Error log: + * using 19.20MHz timestamp clock + * 0xc30 [26.247240] delta [26.245851] lock DED + * 0xc40 [26.247242] delta [0.000002] value 0x00000000000002b4 + * 0xc50 [26.247244] delta [0.000002] value 0x0000000000000109 + * + * DED means deadlock has been detected and the DSP is now halted. The first + * value after DEA is the line number where deadlock occurs and the second + * number is the line number where the lock is allocated. These can be grepped + * like above. */ #if DEBUG_LOCKS #define DBG_LOCK_USERS 8 +#define DBG_LOCK_TRIES 10000 #define trace_lock(__e) trace_error_atomic(TRACE_CLASS_LOCK, __e) #define tracev_lock(__e) tracev_event_atomic(TRACE_CLASS_LOCK, __e) @@ -84,22 +99,29 @@ extern uint32_t lock_dbg_atomic; extern uint32_t lock_dbg_user[DBG_LOCK_USERS]; -#define spin_lock_dbg() \ - trace_lock("LcE"); \ - trace_lock_value(__LINE__); - -#define spin_unlock_dbg() \ - trace_lock("LcX"); \ - trace_lock_value(__LINE__); \ - /* all SMP spinlocks need init, nothing todo on UP */ #define spinlock_init(lock) \ arch_spinlock_init(lock); \ (lock)->user = __LINE__; -/* does nothing on UP systems */ -#define spin_lock(lock) \ - spin_lock_dbg(); \ +/* panic on deadlock */ +#define spin_try_lock_dbg(lock) \ + do { \ + int __tries; \ + for (__tries = DBG_LOCK_TRIES; __tries > 0; __tries--) { \ + if (arch_try_lock(lock)) \ + break; /* lock acquired */ \ + } \ + if (__tries == 0) { \ + trace_lock_error("DED"); \ + trace_lock_value(__LINE__); \ + trace_lock_value((lock)->user); \ + panic(PANIC_DEADLOCK); /* lock not acquired */ \ + } \ + } while (0); + +#if DEBUG_LOCKS_VERBOSE +#define spin_lock_log(lock) \ if (lock_dbg_atomic) { \ int __i = 0; \ int __count = lock_dbg_atomic >= DBG_LOCK_USERS \ @@ -111,8 +133,27 @@ extern uint32_t lock_dbg_user[DBG_LOCK_USERS]; trace_lock_value((lock_dbg_atomic << 24) | \ lock_dbg_user[__i]); \ } \ - } \ - arch_spin_lock(lock); + } + +#define spin_lock_dbg() \ + trace_lock("LcE"); \ + trace_lock_value(__LINE__); + +#define spin_unlock_dbg() \ + trace_lock("LcX"); \ + trace_lock_value(__LINE__); + +#else +#define spin_lock_log(lock) +#define spin_lock_dbg() +#define spin_unlock_dbg() +#endif + +/* does nothing on UP systems */ +#define spin_lock(lock) \ + spin_lock_dbg(); \ + spin_lock_log(lock); \ + spin_try_lock_dbg(lock); #define spin_unlock(lock) \ arch_spin_unlock(lock); \ -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH 1/3] topology: test: Refine name for test generator.
by Xiuli Pan 19 Dec '17

19 Dec '17
From: Pan Xiuli <xiuli.pan(a)linux.intel.com> We have 5 critical arguments in the test generator but only used 3 for the naming, this will make some files be overwritten. Refine the name method to let these 5 arguments show in the tplg name. Also we decide the pipe type in one of the argument, test-ssp.m4 and test-src-ssp.m4 are almost the same, just remove one. Signed-off-by: Pan Xiuli <xiuli.pan(a)linux.intel.com> --- topology/test/test-src-ssp.m4 | 90 ------------------------------------------- topology/test/test-ssp.m4 | 2 +- topology/test/tplg-build.sh | 4 +- 3 files changed, 3 insertions(+), 93 deletions(-) delete mode 100644 topology/test/test-src-ssp.m4 diff --git a/topology/test/test-src-ssp.m4 b/topology/test/test-src-ssp.m4 deleted file mode 100644 index 4a0723e..0000000 --- a/topology/test/test-src-ssp.m4 +++ /dev/null @@ -1,90 +0,0 @@ -# -# Topology for pass through pipeline -# - -# Include topology builder -include(`local.m4') -include(`build.m4') - -# Include TLV library -include(`common/tlv.m4') - -# Include Token library -include(`sof/tokens.m4') - -# Include Baytrail DSP configuration -include(`dsps/byt.m4') - -# -# Machine Specific Config - !! MUST BE SET TO MATCH TEST MACHINE DRIVER !! -# -# TEST_PIPE_NAME - Pipe name -# TEST_DAI_LINK_NAME - BE DAI link name e.g. "NoCodec" -# TEST_SSP_PORT - SSP port number e.g. 2 -# TEST_SSP_FORMAT - SSP data format e.g s16le -# TEST_PIPE_FORMAT - Pipeline format e.g. s16le -# TEST_SSP_BCLK - SSP BCLK in Hz -# TEST_SSP_PHY_BITS - SSP physical slot size -# TEST_SSP_DATA_BITS - SSP data slot size -# - -# -# Define the pipeline -# -# PCM0 <--> SRC <--> SSP TEST_SSP_PORT -# - -# Passthrough playback pipeline 1 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 -# Use DMAC 0 channel 1 for PCM audio playback data - -PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, - 1, 0, 2, TEST_PIPE_FORMAT, - 48, 1000, 0, 0, 0, 1, - SSP, TEST_SSP_PORT, TEST_SSP_FORMAT, 2) - - -# Passthrough playback pipeline 2 on PCM 0 using max 2 channels of s24le. -# Schedule 48 frames per 1000us deadline on core 0 with priority 0 -# Use DMAC 0 channel 1 for PCM audio playback data - -PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, - 2, 0, 2, TEST_PIPE_FORMAT, - 48, 1000, 0, 0, 0, 1, - SSP, TEST_SSP_PORT, TEST_SSP_FORMAT, 2) - -# -# DAI configuration -# -# SSP port TEST_SSP_PORT is our only pipeline DAI -# - -# playback DAI is SSP TEST_SSP_PORT using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 -DAI_ADD(sof/pipe-dai-playback.m4, - 1, SSP, TEST_SSP_PORT, - PIPELINE_SOURCE_1, 2, TEST_SSP_FORMAT, - 48, 1000, 0, 0) - -# capture DAI is SSP TEST_SSP_PORT using 2 periods -# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 -DAI_ADD(sof/pipe-dai-capture.m4, - 2, SSP, TEST_SSP_PORT, - PIPELINE_SINK_2, 2, TEST_SSP_FORMAT, - 48, 1000, 0, 0) - -# PCM Passthrough -PCM_DUPLEX_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) - -# -# BE configurations - overrides config in ACPI if present -# -# Clocks masters wrt codec -# -# TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_SSP_PORT -# -DAI_CONFIG(SSP, TEST_SSP_PORT, TEST_DAI_LINK_NAME, I2S, TEST_SSP_DATA_BITS, - DAI_CLOCK(mclk, 19200000, slave), - DAI_CLOCK(bclk, TEST_SSP_BCLK, slave), - DAI_CLOCK(fsync, 48000, slave), - DAI_TDM(2, TEST_SSP_PHY_BITS, 3, 3)) diff --git a/topology/test/test-ssp.m4 b/topology/test/test-ssp.m4 index ff2756e..92e91bf 100644 --- a/topology/test/test-ssp.m4 +++ b/topology/test/test-ssp.m4 @@ -31,7 +31,7 @@ include(`dsps/byt.m4') # # Define the pipeline # -# PCM0 <---> SSP TEST_SSP_PORT +# PCM0 <-- TEST_PIPE_NAME pipe --> SSP TEST_SSP_PORT # # Passthrough playback pipeline 1 on PCM 0 using max 2 channels of s24le. diff --git a/topology/test/tplg-build.sh b/topology/test/tplg-build.sh index 5c81638..a73335a 100755 --- a/topology/test/tplg-build.sh +++ b/topology/test/tplg-build.sh @@ -12,7 +12,7 @@ M4_FLAGS="-I ../ -I ../m4" # Simple component test cases # can be used on components with 1 sink and 1 source. -SIMPLE_TESTS=(test-ssp test-src-ssp) +SIMPLE_TESTS=(test-ssp) # process m4 simple tests - # simple_test(name, pipe_name, be_name, format, dai_id, dai_format, dai_phy_bits, dai_data_bits dai_bclk) @@ -29,7 +29,7 @@ SIMPLE_TESTS=(test-ssp test-src-ssp) function simple_test { for i in ${SIMPLE_TESTS[@]} do - TFILE="$i$5-$4-48k-$1" + TFILE="$i$5-$2-$4-$6-48k-$1" echo "M4 pre-processing test $i -> ${TFILE}" m4 ${M4_FLAGS} \ -DTEST_PIPE_NAME="$2" \ -- 2.7.4
4 6
0 0
[Sound-open-firmware] [PATCH] Asoc: sof: Fix usage of aif_in/out
by Xiuli Pan 19 Dec '17

19 Dec '17
From: Pan Xiuli <xiuli.pan(a)linux.intel.com> We misuse these two defines, now align the usage. Signed-off-by: Pan Xiuli <xiuli.pan(a)linux.intel.com> --- sound/soc/sof/topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index bef4de1..45d6398 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -887,11 +887,11 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index, ret = sof_widget_load_pipeline(scomp, index, swidget, tw, &reply); break; - case snd_soc_dapm_aif_in: + case snd_soc_dapm_aif_out: ret = sof_widget_load_pcm(scomp, index, swidget, SOF_IPC_STREAM_CAPTURE, tw, &reply); break; - case snd_soc_dapm_aif_out: + case snd_soc_dapm_aif_in: ret = sof_widget_load_pcm(scomp, index, swidget, SOF_IPC_STREAM_PLAYBACK, tw, &reply); break; -- 2.7.4
4 3
0 0
[Sound-open-firmware] [PATCH v2 0/3] configure dma msize according to burst elems
by Keyon Jie 19 Dec '17

19 Dec '17
For designware DMA controller, we should set src_msize and dest_msize according to number of data items(burst_elems), this series implement the setting logic, and configure burst_elems to slot number for dai as peripheral device. Keyon Jie (3): dw-dma: add burst_elems setting to struct dma_sg_element dai: set dai dma burst_elems according to slot number dw-dma: set msize according to burst_elems setting src/audio/dai.c | 5 +++++ src/drivers/dw-dma.c | 25 ++++++++++++++++++++++--- src/include/reef/dma.h | 1 + 3 files changed, 28 insertions(+), 3 deletions(-) -- 2.11.0
4 9
0 0
[Sound-open-firmware] [PATCH 1/4] dw-dma: trace: make sure all trace error are unique
by Liam Girdwood 19 Dec '17

19 Dec '17
Signed-off-by: Liam Girdwood <liam.r.girdwood(a)linux.intel.com> --- src/drivers/dw-dma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index a28281a..390e6bf 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -232,7 +232,7 @@ static int dw_dma_channel_get(struct dma *dma) /* DMAC has no free channels */ spin_unlock_irq(&dma->lock, flags); - trace_dma_error("eDg"); + trace_dma_error("eG0"); return -ENODEV; } @@ -284,7 +284,7 @@ static int dw_dma_start(struct dma *dma, int channel) if (p->chan[channel].status != COMP_STATE_PREPARE || (dw_read(dma, DW_DMA_CHAN_EN) & (0x1 << channel))) { ret = -EBUSY; - trace_dma_error("eDi"); + trace_dma_error("eS0"); trace_value(dw_read(dma, DW_DMA_CHAN_EN)); trace_value(dw_read(dma, DW_CFG_LOW(channel))); trace_value(p->chan[channel].status); @@ -294,7 +294,7 @@ static int dw_dma_start(struct dma *dma, int channel) /* valid stream ? */ if (p->chan[channel].lli == NULL) { ret = -EINVAL; - trace_dma_error("eDv"); + trace_dma_error("eS1"); goto out; } @@ -731,7 +731,7 @@ static void dw_dma_irq_handler(void *data) status_intr = dw_read(dma, DW_INTR_STATUS); if (!status_intr) - trace_dma_error("eDI"); + trace_dma_error("eI0"); tracev_dma("DIr"); @@ -747,7 +747,7 @@ static void dw_dma_irq_handler(void *data) status_err = dw_read(dma, DW_STATUS_ERR); dw_write(dma, DW_CLEAR_ERR, status_err); if (status_err) { - trace_dma_error("eDi"); + trace_dma_error("eI1"); } /* clear platform and DSP interrupt */ @@ -757,7 +757,7 @@ static void dw_dma_irq_handler(void *data) /* confirm IRQ cleared */ status_block = dw_read(dma, DW_STATUS_BLOCK); if (status_block) { - trace_dma_error("eii"); + trace_dma_error("eI2"); trace_value(status_block); } -- 2.14.1
1 1
0 0
[Sound-open-firmware] [PATCH] topology: add implementations for single direction pcm
by Keyon Jie 19 Dec '17

19 Dec '17
Currently it support only dual direction pcm with PCM_DUPLEX_ADD, definitely we need add single direction(playback or capture only) pcm in many cases. Here add implementation of PCM_PLAYBACK_ADD add PCM_CAPTURE_ADD, for playback and capture respectively. Signed-off-by: Keyon Jie <yang.jie(a)linux.intel.com> --- topology/m4/local.m4 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/topology/m4/local.m4 b/topology/m4/local.m4 index c0ffef2..46abaab 100644 --- a/topology/m4/local.m4 +++ b/topology/m4/local.m4 @@ -476,6 +476,46 @@ define(`COMP_SAMPLE_SIZE', dnl COMP_BUFFER_SIZE( num_periods, sample_size, channels, fmames) define(`COMP_BUFFER_SIZE', `eval(`$1 * $2 * $3 * $4')') +dnl PCM_PLAYBACK_ADD(name, pipeline, pcm_id, dai_id, playback) +define(`PCM_PLAYBACK_ADD', +`SectionPCM.STR($1) {' +`' +` index STR($2)' +`' +` # used for binding to the PCM' +` id STR($3)' +`' +` dai.STR($1 $3) {' +` id STR($4)' +` }' +`' +` pcm."playback" {' +`' +` capabilities STR($5)' +` }' +`' +`}') + +dnl PCM_CAPTURE_ADD(name, pipeline, pcm_id, dai_id, capture) +define(`PCM_CAPTURE_ADD', +`SectionPCM.STR($1) {' +`' +` index STR($2)' +`' +` # used for binding to the PCM' +` id STR($3)' +`' +` dai.STR($1 $3) {' +` id STR($4)' +` }' +`' +` pcm."capture" {' +`' +` capabilities STR($5)' +` }' +`' +`}') + dnl PCM_DUPLEX_ADD(name, pipeline, pcm_id, dai_id, playback, capture) define(`PCM_DUPLEX_ADD', `SectionPCM.STR($1) {' -- 2.11.0
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • Older →

HyperKitty Powered by HyperKitty version 1.3.8.