- 14 5月, 2014 1 次提交
-
-
由 Jarkko Nikula 提交于
Commit 10df3509 ("ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.") caused following regression in Baytrail SST: baytrail-pcm-audio baytrail-pcm-audio: error: DMA alloc failed baytrail-pcm-audio baytrail-pcm-audio: error: failed to load firmware Fix this by calling dma_coerce_mask_and_coherent() in sst_byt_init() with the same dma_dev device what is now used in sst_fw_new() when allocating the DMA buffer. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 07 5月, 2014 1 次提交
-
-
由 Liam Girdwood 提交于
Block offset calculations are done in the contiguous allocator so are not required here. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 06 5月, 2014 1 次提交
-
-
由 Liam Girdwood 提交于
This patch fixes the following dereference check ordering. sound/soc/intel/sst-haswell-pcm.c:749 hsw_pcm_probe() warn: variable dereferenced before check 'pdata' (see line 746) git remote add asoc git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git git remote update asoc git checkout 0b708c87 vim +/pdata +749 sound/soc/intel/sst-haswell-pcm.c a4b12990 Mark Brown 2014-03-12 740 }; a4b12990 Mark Brown 2014-03-12 741 a4b12990 Mark Brown 2014-03-12 742 static int hsw_pcm_probe(struct snd_soc_platform *platform) a4b12990 Mark Brown 2014-03-12 743 { a4b12990 Mark Brown 2014-03-12 744 struct sst_pdata *pdata = dev_get_platdata(platform->dev); a4b12990 Mark Brown 2014-03-12 745 struct hsw_priv_data *priv_data; 0b708c87 Liam Girdwood 2014-05-02 @746 struct device *dma_dev = pdata->dma_dev; 0b708c87 Liam Girdwood 2014-05-02 747 int i, ret = 0; a4b12990 Mark Brown 2014-03-12 748 a4b12990 Mark Brown 2014-03-12 @749 if (!pdata) a4b12990 Mark Brown 2014-03-12 750 return -ENODEV; a4b12990 Mark Brown 2014-03-12 751 a4b12990 Mark Brown 2014-03-12 752 priv_data = devm_kzalloc(platform->dev, sizeof(*priv_data), GFP_KERNEL); Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 03 5月, 2014 6 次提交
-
-
由 Liam Girdwood 提交于
Read the stream offset and presentation position from DSP memory rather than using the old estimated position. This fixes timing issues with pulseaudio. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
hw_params() can be called multiple times. Make sure we release the DSP stream that was allocated on previous hw_params() calls before allocating a new DSP stream. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
The Intel IOMMU requires that the ACPI device is used to allocate all DMA memory buffers. This means we need to pass the DMA device pointer into child component devices that allocate DMA memory. We also only set the DMA mask for the ACPI device now instead of for each component device. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
Fix page table creation on Haswell and Broadwell to remove unsafe virt_to_phys mappings and use more portable SG buffer. Use audio buffer APIs to allocate DMA buffers. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
Make sure we add the allocated blocks to the modules list of blocks. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
Make sure we dont alloc blocks twice with requests spanning more than one block. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 24 4月, 2014 1 次提交
-
-
由 Jarkko Nikula 提交于
I suppose there is a possibility that hsw_notification_work() may run after sst_hsw_stream_free() which can lead to a kernel crash since struct sst_hsw_stream is freed at that point and stream = container_of(work, struct sst_hsw_stream, notify_work) is not valid when hsw_notification_work() is run. Reported-by: NDerek Basehore <dbasehore@chromium.org> Reported-by: NWenkai Du <wenkai.du@intel.com> Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 23 4月, 2014 2 次提交
-
-
由 Wenkai Du 提交于
There is a race between sst_byt_stream_free() and sst_byt_get_stream() if sst_byt_get_stream() called from sst_byt_irq_thread() context is accessing the byt->stream_list while a stream is deleted from the list. A stream is added to byt->stream_list in sst_byt_stream_new() and deleted in sst_byt_stream_free(). sst_byt_get_stream() is always protected by sst->spinlock, but the stream addition and deletion are not protected. The patch adds spinlock to both stream addition and deletion. [Jarkko: Same fix added to sst-haswell-ipc.c too] Signed-off-by: NWenkai Du <wenkai.du@intel.com> Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Wenkai Du 提交于
There were occasional ADSP crash during reboot testing: [ 11.883364] BUG: unable to handle kernel paging request at ffffc90121700000 [ 11.883380] IP: [<ffffffffc024d8bc>] sst_module_insert_fixed_block+0x24f/0x26d [snd_soc_sst_dsp] [ 11.883397] PGD 7800b067 PUD 0 [ 11.883405] Oops: 0002 [#1] SMP [ 11.886418] gsmi: Log Shutdown Reason 0x03 The virtual address, ffffc90121700000, was out of range. The virtual address is calculated by adding LPE base address with an offset: sst_memcpy32(dsp->addr.lpe + data->offset, data->data, data->size); The offset is calculated in sst_byt_parse_module, by subtraction of two virtual addresses dsp->addr.fw_ext and dsp->addr.lpe: block_data.offset = block->ram_offset + (dsp->addr.fw_ext - dsp->addr.lpe); These virtual addresses are assigned by kernel from ioremap: sst->addr.lpe = ioremap(pdata->lpe_base, pdata->lpe_size); sst->addr.fw_ext = ioremap(pdata->fw_base, pdata->fw_size); In current driver code, offset is defined as unsigned int32: struct sst_module_data { ... u32 offset; /* offset in FW file */ }; Most of the time kernel assigned virtual addresses with addr.fw_ext greater than addr.lpe. But sometimes it was the other way round. Fix the problem by declaring offset as signed int32_t. Signed-off-by: NWenkai Du <wenkai.du@intel.com> Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 19 4月, 2014 2 次提交
-
-
由 Christian Engelmayer 提交于
Fix an incorrect sizeof() usage in sst_hsw_stream_get_volume(). sst_dsp_read() is called to read into a variable of type u32, but is passed sizeof(u32 *) for argument 'size_t bytes'. Detected by Coverity: CID 1195260. Signed-off-by: NChristian Engelmayer <cengelma@gmx.at> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Dan Carpenter 提交于
The intent was to say "sizeof(*pos)" and not "sizeof(pos)". The sizeof(*pos) is 8 bytes so the bug won't show up on 64 bit systems. The sizeof(*dx) is 172 bytes so that will be a bugfix. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 22 3月, 2014 2 次提交
-
-
由 Lars-Peter Clausen 提交于
Fixes: 115f3f8 ("ASoC: mfld_machine: Convert to table based DAPM and control setup") Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Lars-Peter Clausen 提交于
Use table based setup to register the controls and DAPM widgets and routes. This on one hand makes the code a bit cleaner and on the other hand the board level DAPM elements get registered in the card's DAPM context rather than in the CODEC's DAPM context. The mfld_machine driver is a bit special in that it directly writes to one of the CODEC registers from one of the control handlers. Previous to this patch it was able to get a pointer to the CODEC from the control, since the control was registered with the CODEC. This won't be possible anymore once the control is registered with the card. Since there are already global variables in the driver accessed in the same function the patch adds a global variable that holds a pointer to the CODEC and uses that. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 13 3月, 2014 1 次提交
-
-
由 Stephen Warren 提交于
The rt5640 driver won't compile without I2C enabled. Hence, the Intel Haswell and Baytrail+RT5640 ASoC drivers must also depend on I2C, since these select RT5640. This solves: sound/soc/codecs/rt5640.c:2220:1: warning: data definition has no type or storage class [enabled by default] sound/soc/codecs/rt5640.c:2220:1: error: type defaults to ‘int’ in declaration of ‘module_i2c_driver’ [-Werror=implicit-int] sound/soc/codecs/rt5640.c:2220:1: warning: parameter names (without types) in function declaration [enabled by default] sound/soc/codecs/rt5640.c:2210:26: warning: ‘rt5640_i2c_driver’ defined but not used [-Wunused-variable] Reported-by: NJim Davis <jim.epost@gmail.com> Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 07 3月, 2014 3 次提交
-
-
由 Liam Girdwood 提交于
Clean up some indentation. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
Update the Haswell driver to use .dai_fmt in DAI link to set the format. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
Check the return value for error when processing replies and notifications. The patch 22981243: "ASoC: Intel: Add Haswell/Broadwell IPC" from > Feb 20, 2014, leads to the following imaginary static checker warning: > > sound/soc/intel/sst-haswell-ipc.c:898 hsw_irq_thread() > warn: this is always true. > > sound/soc/intel/sst-haswell-ipc.c > 895 /* Handle Immediate reply from DSP Core */ > 896 handled = hsw_process_reply(hsw, ipcx); > ^^^^^^^^^^^^^^^^^ > Returns 1 on success/error and -EIO on error. > > 897 > 898 if (handled) { > 899 /* clear DONE bit - tell DSP we have completed */ > 900 sst_dsp_shim_update_bits_unlocked(sst, SST_IPCX, > 901 SST_IPCX_DONE, 0); > 902 > 903 /* unmask Done interrupt */ > 904 sst_dsp_shim_update_bits_unlocked(sst, SST_IMRX, > 905 SST_IMRX_DONE, 0); > 906 } > Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 06 3月, 2014 1 次提交
-
-
由 Dan Carpenter 提交于
Calling "kfree(byt)" is a double free because that was allocated with devm_kzalloc(). There were a couple places which leak "byt->msg". That memory is allocated in msg_empty_list_init(). Fixes: f7d01fd6 ('ASoC: Intel: Add Intel Baytrail SST DSP IPC support') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 26 2月, 2014 7 次提交
-
-
由 Jarkko Nikula 提交于
Some kernel configurations can cause following build error: sound/soc/intel/sst-baytrail-ipc.c: In function ‘sst_byt_get_dsp_position’: sound/soc/intel/sst-baytrail-ipc.c:744:2: error: implicit declaration of function ‘memcpy_fromio’ [-Werror=implicit-function-declaration] memcpy_fromio(&fw_tstamp, ^ cc1: some warnings being treated as errors Fix this by including <linux/io.h> explicitly. Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Jarkko Nikula 提交于
Setting static DAI format has been supported in the soc-core quite some time now so there is no need to set it runtime in machine driver. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NLiam Girdwoood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Jarkko Nikula 提交于
Use more sensible kcontrol names than "Int Mic" and "Ext Spk". Speakers especially are usually integrated devices in sales models. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NLiam Girdwoood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Dan Carpenter 提交于
This should be sizeof(pos) instead of sizeof(&pos). Most likely they are both 8 bytes though so it doesn't often make a difference in real life. Fixes: 22981243 ('ASoC: Intel: Add Haswell/Broadwell IPC') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Dan Carpenter 提交于
This should be spin_unlock_irqrestore() instead of spin_unlock() Fixes: 22981243 ('ASoC: Intel: Add Haswell/Broadwell IPC') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Dan Carpenter 提交于
There were some curly braces intended here, but the code actually works the same either way so it's not a bug. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Jarkko Nikula 提交于
I swear I tested missing firmware in commit e5161d79 ("ASoC: Intel: sst-acpi: Request firmware before SST platform driver probing"). Unfortunately same wasn't done in commit 6dda27cb ("ASoC: Intel: sst-acpi: Add support for multiple machine drivers per platform") which will cause NULL pointer dereference in sst_acpi_fw_cb() when printing the error since sst_acpi->mach is not set. Fix this obvious error by setting the sst_acpi->mach in sst_acpi_probe(). Reported-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 25 2月, 2014 7 次提交
-
-
由 Jarkko Nikula 提交于
Enable build support for Baytrail SST DSP platform and byt-rt5640 machine drivers. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Jarkko Nikula 提交于
Add Baytrail SST descriptor with the byt-rt5640 machine driver to sst-acpi loader. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Jarkko Nikula 提交于
Add machine driver for Baytrail SST DSP platform with RT5640 audio codec. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Jarkko Nikula 提交于
This adds the Baytrail SST DSP PCM platform driver. It registers itself with the ALSA SoC layer and uses Intel Baytrail SST DSP IPC for DSP control. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Jarkko Nikula 提交于
Add support for Baytrail SST DSP IPC. This provides mechanism to communicate with the DSP firmware. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Jarkko Nikula 提交于
This adds basic functionality for Baytrail SST DSP initialization and firmware loading. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Jarkko Nikula 提交于
While the SHIM register addresses in Baytrail are the same than Haswell and Broadwell their register size is 64-bit and some bits are different. This patch adds the SST device ID for Baytrail and Baytrail specific SHIM bit definitions. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 22 2月, 2014 5 次提交
-
-
由 Liam Girdwood 提交于
Add support for Haswell based machines with SST DSP audio. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
Build the Haswell/Broadwell PCM, IPC and DSP drivers. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
Add the Haswell and Broadwell PCM DSP platform driver. This driver uses the IPC driver for communication with the SST DSP. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
Add support for Haswell and Broadwell DSP IPC. This is used by the DSP platform PCM driver to configure the DSP for audio operations. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Liam Girdwood 提交于
Add support for low level differentiation functions for Haswell and Broadwell SST DSPs. This includes suppoprt for DSP boot and reset, DSP firmware module parsing and DSP memory block map initialisation. Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-