[Sound-open-firmware] [PATCH v2 2/3] dai: set dai dma burst_elems according to slot number

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Tue Dec 19 14:36:40 CET 2017



On 12/18/2017 11:06 PM, Keyon Jie wrote:
> We should set burst_elems for dma peripheral dev copy, for
> dai/ssp, it should be set to valid slot number, otherwise,
> the dma may copy in wrong burst size and data will run with
> wrong speed.
I don't think the commit message reflects the code, it's really the 
total number of active slots and not the slot number(s) that we care 
about, right?
>
> Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
> ---
>   src/audio/dai.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/src/audio/dai.c b/src/audio/dai.c
> index c50a274..9058f5c 100644
> --- a/src/audio/dai.c
> +++ b/src/audio/dai.c
> @@ -601,6 +601,11 @@ static int dai_position(struct comp_dev *dev, struct sof_ipc_stream_posn *posn)
>   
>   static int dai_config(struct comp_dev *dev, struct sof_ipc_dai_config *config)
>   {
> +	struct dai_data *dd = comp_get_drvdata(dev);
> +
> +	/* set dma burst elems to slot number */
> +	dd->config.burst_elems = config->num_slots;
> +
>   	/* calc frame bytes */
>   	switch (config->sample_valid_bits) {
>   	case 16:



More information about the Sound-open-firmware mailing list