All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 05/11] ASoC: SOF: Add PCM operations support
Date: Tue, 24 Jul 2018 16:07:55 +0100	[thread overview]
Message-ID: <20180724150755.GG13268@sirena.org.uk> (raw)
In-Reply-To: <20180719185335.30912-5-liam.r.girdwood@linux.intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 1427 bytes --]

On Thu, Jul 19, 2018 at 07:53:29PM +0100, Liam Girdwood wrote:

> +/* Create DMA buffer page table for DSP */
> +static int create_page_table(struct snd_pcm_substream *substream,
> +			     unsigned char *dma_area, size_t size)
> +{

That's a very generic name!

> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> +	struct snd_soc_component *component =
> +		snd_soc_rtdcom_lookup(rtd, DRV_NAME);
> +	struct snd_sof_dev *sdev =
> +		snd_soc_component_get_drvdata(component);
> +	struct snd_sof_pcm *spcm = rtd->sof;
> +	struct snd_dma_buffer *dmab = snd_pcm_get_dma_buf(substream);
> +	int stream = substream->stream;
> +
> +	return snd_sof_create_page_table(sdev, dmab,
> +		spcm->stream[stream].page_table.area, size);
> +}

...for a super thin wrapper.

> +	/* nothing todo for BE */
> +	if (rtd->dai_link->no_pcm)
> +		return 0;

Should these operations be defined for a back end or should back ends
have their own set of operations?  Do we even need to use DPCM here for
that matter?

> +	case SOF_DAI_INTEL_DMIC:
> +		/* DMIC only supports 16 or 32 bit formats */
> +		if (dai->comp_dai.config.frame_fmt == SOF_IPC_FRAME_S24_4LE) {
> +			dev_err(sdev->dev,
> +				"error: invalid fmt %d for DAI type %d\n",
> +				dai->comp_dai.config.frame_fmt,
> +				dai->dai_config.type);
> +		}
> +		/* TODO: add any other DMIC specific fixups */
> +		break;

We print an error but don't actually do anything about it?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2018-07-24 15:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 18:53 [PATCH 01/11] ASoC: SOF: Add Sound Open Firmware driver core Liam Girdwood
2018-07-19 18:53 ` [PATCH 02/11] ASoC: SOF: Add Sound Open Firmware KControl support Liam Girdwood
2018-07-23 18:58   ` Mark Brown
2018-07-19 18:53 ` [PATCH 03/11] ASoC: SOF: Add driver debug support Liam Girdwood
2018-07-23 19:03   ` Mark Brown
2018-07-19 18:53 ` [PATCH 04/11] ASoC: SOF: Add support for IPC IO between DSP and Host Liam Girdwood
2018-07-19 18:53 ` [PATCH 05/11] ASoC: SOF: Add PCM operations support Liam Girdwood
2018-07-24 15:07   ` Mark Brown [this message]
2018-07-19 18:53 ` [PATCH 06/11] ASoC: SOF: Add support for loading topologies Liam Girdwood
2018-07-19 18:53 ` [PATCH 07/11] ASoC: SOF: Add DSP firmware trace event support Liam Girdwood
2018-07-19 18:53 ` [PATCH 08/11] ASoC: SOF: Add DSP HW abstraction operations Liam Girdwood
2018-07-30 15:21   ` Mark Brown
2018-07-19 18:53 ` [PATCH 09/11] ASoC: SOF: Add firmware loader support Liam Girdwood
2018-07-19 18:53 ` [PATCH 10/11] ASoC: SOF: Add userspace ABI support Liam Girdwood
2018-07-19 18:53 ` [PATCH 11/11] ASoC: SOF: Add Build support for SOF core Liam Girdwood
2018-07-20 14:11   ` Pierre-Louis Bossart
2018-07-19 18:58 ` [PATCH 01/11] ASoC: SOF: Add Sound Open Firmware driver core Takashi Iwai
2018-07-20 11:05   ` Liam Girdwood
2018-07-23 18:56 ` Mark Brown
2018-08-22 16:26   ` Liam Girdwood
2018-07-24 15:57 ` Pierre-Louis Bossart
2018-07-25  7:36   ` Takashi Iwai
2018-07-25 13:57     ` Pierre-Louis Bossart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180724150755.GG13268@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=liam.r.girdwood@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.