Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jun Nie <jun.nie@linaro.org>
Cc: alsa-devel@alsa-project.org, shawn.guo@linaro.org,
	wan.zhijun@zte.com.cn, lgirdwood@gmail.com,
	zte-lt@lists.linaro.org
Subject: Re: [PATCH 1/2] ASoC: zx: Add ZTE zx296702 pcm support
Date: Fri, 1 May 2015 12:17:14 +0100	[thread overview]
Message-ID: <20150501111714.GX22845@sirena.org.uk> (raw)
In-Reply-To: <1430366850-10281-1-git-send-email-jun.nie@linaro.org>


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

On Thu, Apr 30, 2015 at 12:07:29PM +0800, Jun Nie wrote:

> +static const struct snd_pcm_hardware snd_zx_hardware = {
> +	.info			= SNDRV_PCM_INFO_MMAP |
> +				  SNDRV_PCM_INFO_MMAP_VALID |
> +				  SNDRV_PCM_INFO_INTERLEAVED |
> +				  SNDRV_PCM_INFO_PAUSE |
> +				  SNDRV_PCM_INFO_RESUME |
> +				  SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
> +	.period_bytes_min	= 32,
> +	.period_bytes_max	= 16 * 1024,
> +	.periods_min		= 2,
> +	.periods_max		= 32,
> +	.buffer_bytes_max	= 60 * 1024,
> +};

Can the generic DMA code not work this out by querying the dmaengine
driver?

> +int zx_pcm_platform_register(struct device *dev)
> +{
> +	return devm_snd_dmaengine_pcm_register(dev, &zx_dmaengine_pcm_config,
> +			SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME |
> +			SND_DMAENGINE_PCM_FLAG_NO_RESIDUE);

_NO_RESIDUE has been removed in current code, the core figures it out
automatically.  Like I said looking at the driver code I'm not clear why
this is specifying _CUSTOM_CHANNEL_NAME either, it looked like the
driver just used the one standard channel name.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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



      parent reply	other threads:[~2015-05-01 11:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1430366850-10281-1-git-send-email-jun.nie@linaro.org>
     [not found] ` <1430366850-10281-2-git-send-email-jun.nie@linaro.org>
2015-05-01 10:55   ` [PATCH 2/2] ASoC: zx: Add zx296702 SPDIF support Mark Brown
     [not found]     ` <CABymUCNcD_7fxCh110A-w5=3Lo5Jn2aCHGy3DwLDroZP9oqi4w@mail.gmail.com>
2015-05-04 13:54       ` Mark Brown
     [not found]         ` <CABymUCNYZ=ik9Z6zfOXzFN6GyfQ+Z98EArPuG-s1e2S01rvU-w@mail.gmail.com>
2015-05-05 22:07           ` Mark Brown
2015-05-01 11:17 ` Mark Brown [this message]

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=20150501111714.GX22845@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=jun.nie@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=shawn.guo@linaro.org \
    --cc=wan.zhijun@zte.com.cn \
    --cc=zte-lt@lists.linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox