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 -----
  • July
  • June
  • 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

  • 1572 discussions
[Sound-open-firmware] [PATCH 2/2] cnl: dma: refine dma interrupt processing on cnl
by Rander Wang 09 Mar '18

09 Mar '18
On cnl, all the dma share the same interrupt pin, so all the dma controller need to be checked in interrupt function. Signed-off-by: Rander Wang <rander.wang(a)linux.intel.com> --- src/drivers/dw-dma.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index f736679..a06087e 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -1136,6 +1136,26 @@ static void dw_dma_irq_handler(void *data) } } +/*All the dma share the same interrupt on CNL, so check each dma*/ +/*controller when interrupt coming, then do the work */ +static void dw_dma_irq_cnl(void *data) +{ + struct dma *dma; + uint32_t status_intr; + + /*check interrupt status of DMA controller 0*/ + dma = dma_get(DMA_GP_LP_DMAC0); + status_intr = dw_read(dma, DW_INTR_STATUS); + if (status_intr) + dw_dma_irq_handler(dma); + + /*check interrupt status of DMA controller 1*/ + dma = dma_get(DMA_GP_LP_DMAC1); + status_intr = dw_read(dma, DW_INTR_STATUS); + if (status_intr) + dw_dma_irq_handler(dma); +} + static int dw_dma_probe(struct dma *dma) { struct dma_pdata *dw_pdata; @@ -1157,7 +1177,11 @@ static int dw_dma_probe(struct dma *dma) } /* register our IRQ handler */ +#ifdef CONFIG_CANNONLAKE + interrupt_register(dma_irq(dma), dw_dma_irq_cnl, dma); +#else interrupt_register(dma_irq(dma), dw_dma_irq_handler, dma); +#endif interrupt_enable(dma_irq(dma)); return 0; -- 2.14.1
3 8
0 0
[Sound-open-firmware] [PATCH] clk: add missing break in switch block
by Pierre-Louis Bossart 09 Mar '18

09 Mar '18
Make static analyzers happy by adding a break. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com> --- src/platform/baytrail/clk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/baytrail/clk.c b/src/platform/baytrail/clk.c index fc1cd9d..fc535ca 100644 --- a/src/platform/baytrail/clk.c +++ b/src/platform/baytrail/clk.c @@ -214,6 +214,7 @@ uint32_t clock_set_freq(int clock, uint32_t hz) /* tell anyone interested we have now changed CPU freq */ notifier_event(NOTIFIER_ID_SSP_FREQ, CLOCK_NOTIFY_POST, &notify_data); + break; default: break; -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH] dw-dma: simplify conditional statement
by Pierre-Louis Bossart 09 Mar '18

09 Mar '18
detected with sonarcloud: fix pointer test and avoid redundant evaluation of lli as always true. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com> --- src/drivers/dw-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index f6f776a..7659bec 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -779,7 +779,7 @@ static inline void dw_dma_chan_reload_lli(struct dma *dma, int channel) struct dw_lli2 *lli = p->chan[channel].lli_current; /* only need to reload if this is a block transfer */ - if (lli == 0 || (lli && lli->llp == 0)) { + if (!lli || lli->llp == 0) { p->chan[channel].status = COMP_STATE_PREPARE; return; } -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH] volume: fix error in logical operations
by Pierre-Louis Bossart 09 Mar '18

09 Mar '18
Detected with sonarcloud: test evaluates as always true. Make sure both volume and switch are handled correctly Fixes: 43e86cab608 ('volume: fix logic for volume mute/unmute') Cc: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com> --- src/audio/volume.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio/volume.c b/src/audio/volume.c index ee9b361..45a343e 100644 --- a/src/audio/volume.c +++ b/src/audio/volume.c @@ -525,7 +525,8 @@ static int volume_ctrl_get_cmd(struct comp_dev *dev, struct sof_ipc_ctrl_data *c return -EINVAL; } - if (cdata->cmd == SOF_CTRL_CMD_VOLUME || SOF_CTRL_CMD_SWITCH) { + if (cdata->cmd == SOF_CTRL_CMD_VOLUME || + cdata->cmd == SOF_CTRL_CMD_SWITCH) { trace_volume("vgt"); trace_value(cdata->comp_id); for (j = 0; j < cdata->num_elems; j++) { -- 2.14.1
1 0
0 0
[Sound-open-firmware] [PATCH] cnl: ssp: fix DSP_B setting in ssp
by Rander Wang 08 Mar '18

08 Mar '18
set ssp according to DSP_B spec Signed-off-by: Rander Wang <rander.wang(a)linux.intel.com> --- src/drivers/apl-ssp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drivers/apl-ssp.c b/src/drivers/apl-ssp.c index a726f3c..c32bd35 100644 --- a/src/drivers/apl-ssp.c +++ b/src/drivers/apl-ssp.c @@ -333,10 +333,11 @@ static inline int ssp_set_config(struct dai *dai, sscr0 |= SSCR0_MOD | SSCR0_FRDC(config->num_slots); /* set asserted frame length */ - frame_len = config->sample_container_bits; + frame_len = 1; /* handle frame polarity, DSP_A default is rising/active high */ - sspsp |= SSPSP_SFRMP(inverted_frame); + sspsp |= SSPSP_SFRMP(!inverted_frame); + sspsp |= SSPSP_FSRT; break; default: -- 2.14.1
4 8
0 0
[Sound-open-firmware] [PATCH 0/7] ASoC: SOF: Memory window stream update support
by Xiuli Pan 07 Mar '18

07 Mar '18
From: Pan Xiuli <xiuli.pan(a)linux.intel.com> This patch set is split from 2 patch. And used with master SOF FW. Pan Xiuli (7): ASoC: SOF: Add position update related header ASoc: SOF: Refine memory window for APL ASoc: SOF: Add memory window for BYT ASoc: SOF: Add memory window for HSW ASoc: SOF: Add memory window for BDW ASoC: SOF: Add position offset update in PCM ASoc: SOF: Add position update through memory window sound/soc/sof/hw-apl.c | 27 +++++++++++-- sound/soc/sof/hw-bdw.c | 101 ++++++++++++++++++++++++++++++++++++++++++---- sound/soc/sof/hw-byt.c | 102 +++++++++++++++++++++++++++++++++++++++++++---- sound/soc/sof/hw-hsw.c | 101 ++++++++++++++++++++++++++++++++++++++++++---- sound/soc/sof/ipc.c | 73 +++++++++++++++++++++++++-------- sound/soc/sof/pcm.c | 16 ++++++-- sound/soc/sof/sof-priv.h | 2 + 7 files changed, 377 insertions(+), 45 deletions(-) -- 2.7.4
2 8
0 0
[Sound-open-firmware] [PATCH] dma: change dma transfer type to enum.
by Keyon Jie 07 Mar '18

07 Mar '18
Change to use enum for dma transfer type. Signed-off-by: Keyon Jie <yang.jie(a)linux.intel.com> --- src/drivers/dw-dma.c | 2 +- src/drivers/hda-dma.c | 2 +- src/include/reef/dma.h | 18 ++++++++++-------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index c2d6917..49f782d 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -249,7 +249,7 @@ /* data for each DMA channel */ struct dma_chan_data { uint32_t status; - uint32_t direction; + enum dma_copy_dir direction; struct dw_lli2 *lli; struct dw_lli2 *lli_current; uint32_t desc_count; diff --git a/src/drivers/hda-dma.c b/src/drivers/hda-dma.c index 06b2d9c..d2064e8 100644 --- a/src/drivers/hda-dma.c +++ b/src/drivers/hda-dma.c @@ -84,7 +84,7 @@ struct hda_chan_data { uint32_t status; uint32_t desc_count; uint32_t desc_avail; - uint32_t direction; + enum dma_copy_dir direction; }; struct dma_pdata { diff --git a/src/include/reef/dma.h b/src/include/reef/dma.h index f82b533..247bcbf 100644 --- a/src/include/reef/dma.h +++ b/src/include/reef/dma.h @@ -38,13 +38,15 @@ #include <reef/reef.h> #include <reef/wait.h> -/* DMA directions */ -#define DMA_DIR_MEM_TO_MEM 0 /* local memcpy */ -#define DMA_DIR_HMEM_TO_LMEM 1 /* host to local memcpy */ -#define DMA_DIR_LMEM_TO_HMEM 2 /* local to host memcpy */ -#define DMA_DIR_MEM_TO_DEV 3 -#define DMA_DIR_DEV_TO_MEM 4 -#define DMA_DIR_DEV_TO_DEV 5 +/* types of DMA directions */ +enum dma_copy_dir { + DMA_DIR_MEM_TO_MEM = 0, /* local memcpy */ + DMA_DIR_HMEM_TO_LMEM, /* host to local memcpy */ + DMA_DIR_LMEM_TO_HMEM, /* local to host memcpy */ + DMA_DIR_MEM_TO_DEV, + DMA_DIR_DEV_TO_MEM, + DMA_DIR_DEV_TO_DEV, +}; /* DMA IRQ types */ #define DMA_IRQ_TYPE_BLOCK (1 << 0) @@ -71,7 +73,7 @@ struct dma_sg_config { uint32_t src_width; /* in bytes */ uint32_t dest_width; /* in bytes */ uint32_t burst_elems; - uint32_t direction; + enum dma_copy_dir direction; uint32_t src_dev; uint32_t dest_dev; uint32_t cyclic; /* circular buffer */ -- 2.14.1
2 1
0 0
[Sound-open-firmware] [PATCH] topology: Remove volume mute in volume pipeline
by Xiuli Pan 07 Mar '18

07 Mar '18
From: Pan Xiuli <xiuli.pan(a)linux.intel.com> Volume mute will cause a regression. Delete it now. Signed-off-by: Pan Xiuli <xiuli.pan(a)linux.intel.com> --- Test with: Mininow max rt5651 and GP-MRB nocodec SOF master: 77ed88aa4a26c3ff6f479bf0894a13c87119ffdc SOF-Tool master: 3105de2481b5b5511b2fa844fe859f023f434b4c https://github.com/plbossart/sound/tree/topic/sof-v4.14: d919ea06b7f79c95ab4eb68baf05e9faf3a894c1 --- topology/sof/pipe-volume-playback.m4 | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/topology/sof/pipe-volume-playback.m4 b/topology/sof/pipe-volume-playback.m4 index 90fe303..d6624b0 100644 --- a/topology/sof/pipe-volume-playback.m4 +++ b/topology/sof/pipe-volume-playback.m4 @@ -25,15 +25,6 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID, Channel register and shift for Front Left/Right, LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1))) -# Volume Mixer Switch control with max value of 1 -C_CONTROLMIXER(Master Playback Volume Switch, PIPELINE_ID, - CONTROLMIXER_OPS(volsw, 256 binds the mixer control to volume get/put handlers, 256, 256), - CONTROLMIXER_MAX(max value 1 indicates switch type control, 1), - false, - , - Channel register and shift for Front Left/Right, - LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1))) - # # Components and Buffers # @@ -43,7 +34,7 @@ C_CONTROLMIXER(Master Playback Volume Switch, PIPELINE_ID, W_PCM_PLAYBACK(Passthrough Playback, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 2, 0, 2) # "Volume" has 2 source and 2 sink periods -W_PGA(0, PIPELINE_FORMAT, 2, 2, 2, LIST(` ', "Master Playback Volume Switch", "Master Playback Volume")) +W_PGA(0, PIPELINE_FORMAT, 2, 2, 2, LIST(` ', "Master Playback Volume")) # Playback Buffers W_BUFFER(0, COMP_BUFFER_SIZE(2, -- 2.7.4
2 1
0 0
[Sound-open-firmware] [PATCH] hda-dma: fix src_width and dest_width for 32 bit container case
by Keyon Jie 07 Mar '18

07 Mar '18
The src_width and dest_width are configured already in Bytes, here fix it, otherwise 24/32 bit copying with hda-dma may have problem. Reported-by: Zhigang Wu <zhigang.wu(a)linux.intel.com> Signed-off-by: Keyon Jie <yang.jie(a)linux.intel.com> --- src/drivers/hda-dma.c | 6 +++--- src/include/reef/dma.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/drivers/hda-dma.c b/src/drivers/hda-dma.c index 57cb7fc..06b2d9c 100644 --- a/src/drivers/hda-dma.c +++ b/src/drivers/hda-dma.c @@ -343,11 +343,11 @@ static int hda_dma_set_config(struct dma *dma, int channel, /* firmware control buffer */ dgcs = DGCS_FWCB; - /* set DGCS.SCS bit to 0 for 32 bit container */ + /* set DGCS.SCS bit to 1 for 16bit(2B) container */ if ((config->direction == DMA_DIR_HMEM_TO_LMEM && - config->dest_width <= 16) || + config->dest_width <= 2) || (config->direction == DMA_DIR_LMEM_TO_HMEM && - config->src_width <= 16)) + config->src_width <= 2)) dgcs |= DGCS_SCS; /* init channel in HW */ diff --git a/src/include/reef/dma.h b/src/include/reef/dma.h index 71bce56..f82b533 100644 --- a/src/include/reef/dma.h +++ b/src/include/reef/dma.h @@ -68,8 +68,8 @@ struct dma_sg_elem { /* DMA physical SG params */ struct dma_sg_config { - uint32_t src_width; - uint32_t dest_width; + uint32_t src_width; /* in bytes */ + uint32_t dest_width; /* in bytes */ uint32_t burst_elems; uint32_t direction; uint32_t src_dev; -- 2.14.1
2 1
0 0
[Sound-open-firmware] [PATCH_V2 1/2] cnl: dma: refine dma probe
by Rander Wang 07 Mar '18

07 Mar '18
Probe each dma individually --- V2: rebase on master Tested with: SOF master kernel:pierre V4.14 branch Signed-off-by: Rander Wang <rander.wang(a)linux.intel.com> --- src/drivers/dw-dma.c | 38 +++++++++++--------------------------- src/platform/cannonlake/platform.c | 5 +++++ 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index c2d6917..ccefc50 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -1048,14 +1048,7 @@ static void dw_dma_irq_handler(void *data) status_intr = dw_read(dma, DW_INTR_STATUS); if (!status_intr) { -#ifdef CONFIG_CANNONLAKE - dma++; - status_intr = dw_read(dma, DW_INTR_STATUS); - if (!status_intr) - trace_dma_error("eI0"); -#else trace_dma_error("eI0"); -#endif } tracev_dma("DIr"); @@ -1148,31 +1141,22 @@ static void dw_dma_irq_handler(void *data) static int dw_dma_probe(struct dma *dma) { struct dma_pdata *dw_pdata; - struct dma *dmac = dma; int i; -#ifdef CONFIG_CANNONLAKE - int j; - - for (j = 0; j < MAX_GPDMA_COUNT; j++) -#endif - { - /* allocate private data */ - dw_pdata = rzalloc(RZONE_SYS, SOF_MEM_CAPS_RAM, - sizeof(*dw_pdata)); - dma_set_drvdata(dmac, dw_pdata); - spinlock_init(&dmac->lock); + /* allocate private data */ + dw_pdata = rzalloc(RZONE_SYS, SOF_MEM_CAPS_RAM, + sizeof(*dw_pdata)); + dma_set_drvdata(dma, dw_pdata); - dw_dma_setup(dmac); + spinlock_init(&dma->lock); - /* init work */ - for (i = 0; i < DW_MAX_CHAN; i++) { - dw_pdata->chan[i].dma = dmac; - dw_pdata->chan[i].channel = i; - dw_pdata->chan[i].status = COMP_STATE_INIT; - } + dw_dma_setup(dma); - dmac++; + /* init work */ + for (i = 0; i < DW_MAX_CHAN; i++) { + dw_pdata->chan[i].dma = dma; + dw_pdata->chan[i].channel = i; + dw_pdata->chan[i].status = COMP_STATE_INIT; } /* register our IRQ handler */ diff --git a/src/platform/cannonlake/platform.c b/src/platform/cannonlake/platform.c index 32a4454..ad26a06 100644 --- a/src/platform/cannonlake/platform.c +++ b/src/platform/cannonlake/platform.c @@ -259,6 +259,11 @@ int platform_init(struct reef *reef) return -ENODEV; dma_probe(dmac); + dmac = dma_get(DMA_GP_LP_DMAC1); + if (!dmac) + return -ENODEV; + dma_probe(dmac); + dmac = dma_get(DMA_HOST_OUT_DMAC); if (!dmac) return -ENODEV; -- 2.14.1
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • ...
  • 158
  • Older →

HyperKitty Powered by HyperKitty version 1.3.8.