The element frame_size in dai_config struct is actually
sample size for each channel, e.g. 24 for S24_4LE, so
rename it to sample_size to avoid confusion.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
As the normal static pipeline can work fine after the 1.33->1ms
buffer and 16->32 bits internal buffer transforming finished,
let's change back to use normal static pipeline by default.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
As we have changed internal buffer to 32 bits, to
avoid clamping, we need to change accumulator to
64 bits.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
As we are using 32 bits data in internal buffer, we need
24bit<==>32bit volume scaler for host<==>processing<==>dai
converting.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
When the host buffer is not 1ms aligned and splitting happens,
the increment is not period size, this wrong pointer will make
pcm data missed/clipped and sound noisy.
Changing to use the actual size last dma copy consumed,
local_elem->size, to fix the issue.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Adding stream_format to indicate the stream format that the
dai buffer is using, which will be used for volume copy
functions mapping.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Make the mixer compute two channels per loop iteration. This allows for
easier vectorisation. The loop is also more efficient if we update or
source/sink pointers after mixing has completed.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The conversion should up/down convert only if source/sink is host or dai.
Volume should be 32 bit at all other times
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Use period frames instead of period size in bytes. This makes the pipeline
configuration less ambiguous and also allows for host, dai and internal frame
sizes to be defined.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Host buffers are not guaranteed to be continuous physical pages or a factor
of the DSP period size. Add support for non continuous host buffers of any
size.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The host buffer may not be a multiple of host PHY page size, so provide
so pass this value as part of our host buffer init.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add support to immediately reload the DMA during a DMA transfer completion
callback. This allows components to respond quickly to any physical
DMA copy updates i.e. period split over two non continuous physical host
pages.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
add 16bit<==>24bit volume copy function and mapping, for
24 bits ssp output/input.
here also optimize all other volume copy functions.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
switch the BCLK generation from shim ssp clock divider to
using SSCR0.SCR, as the divider may lead to jitter.
clear and remove M/N divider part code.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
for DMA controller, we need mask dsp local memory before
setting it to DMAC registers, otherwise, DMAC will locate
to wrong memory address.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
We need clear/reset buffer content to 0s each time
creating a pipeline buffer, to avoid random noise
when using it.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
In order to use native XTENSA compiler the core target needs to
be overwite with the good platform. This patch is adding an optional
option in order to be able to overwrite the core selection.
Example:
- Set Xtensa export PATH=$PATH:<PATH>/xtensa/XtDevTools/install/tools/RD-2012.5-linux/XtensaTools
./configure --with-arch=xtensa --with-platform=baytrail --with-dsp-core=CHT_audio_hifiep --with-root-dir=<PATH>/xtensa/XtDevTools/install/tools/RD-2012.5-linux/XtensaTools --host=xtensa CC=xt-xcc OBJCOPY=xt-objcopy OBJDUMP=xt-objdump
make
make bin
Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com>
In order to set the Root directory of the DSP compiler we should
use --with-root-dir instead of --with-tool-dir
Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com>
On the linux driver side, it need get version infomation
from fw, including:
type -- Reef
version -- major.minor
build number
last commit id -- gID
So here we use the package string, which come from git
version, which can provide all those fw version infos.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
We are using 6 states, 2 of them are substates:
init, idle, running, paused,
draining(sub state when transferring from running to idle)
pausing(substate when transferring from running to paused).
Don't response new command when in substates, only stay in
substates for limited timeout. e.g. 2ms for draing and 1ms
for pausing.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
The tool-dir naming was a bit ambiguous so rename and fix build-all.sh
to use new name too.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
The DMA controller needs to differentiate between host and DSP memory
regions. This can be done with a mask that is ORed with local DSP memory
locations.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
rimage converts ELF binaries to the firmware image file format understood
by the kernel audio drivers.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This project provides an open source audio firmware infrastructure for audio
DSPs found on many modern devices. The intention is to allow developers to
create their own codecs, audio processing algorithms and pipelines using
the infrastructure and audio components provided by this project.
The project currently supports the Intel Baytrail and Cherrytrail audio DSP
platforms which use the Xtensa architecture.
The firmware source code is released under the BSD 3 clause licence.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>