alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Vinod Koul <vinod.koul@linux.intel.com>
Cc: alsa-devel@alsa-project.org, namartax.kohli@intel.com,
	lrg@ti.com, ramesh.babu@intel.com,
	pierre-louis.bossart@linux.intel.com
Subject: Re: [RFC PATCH 2/2] ASoC: add compress stream support
Date: Thu, 2 Aug 2012 19:09:27 +0100	[thread overview]
Message-ID: <20120802180926.GL4537@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1343716900-23491-3-git-send-email-vinod.koul@linux.intel.com>

On Tue, Jul 31, 2012 at 12:11:40PM +0530, Vinod Koul wrote:
> From: Namarta Kohli <namartax.kohli@intel.com>
> 
> This patch adds the support to parse the compress dai's and then also adds the
> soc-compress.c file while handles the compress stream operations, mostly analogous 
> to what is done in the soc-pcm.c and additional handling of the compress
> operations

This is all mostly fine, though it's very sad that there's so much code
duplication between this and the regular PCM streams.  Some smallish
comments below.

> +	if (cstream->direction == SND_COMPRESS_PLAYBACK) {
> +		cpu_dai->playback_active++;
> +		codec_dai->playback_active++;
> +	} else {
> +		cpu_dai->capture_active++;
> +		codec_dai->capture_active++;
> +	}
> +	cpu_dai->active++;
> +	codec_dai->active++;

In quite a few places in the code there's missing blanks between blocks
of code.

> +int soc_compr_set_params(struct snd_compr_stream *cstream,
> +					struct snd_compr_params *params)
> +{

> +	snd_soc_dai_digital_mute(codec_dai, 0);

This looks wrong - the unmute should be associated with the start of the
data transfer rather than the configuration.  But we don't have any
other ops...  can we have one, or a non-atomic trigger?

> +	/* check client and interface hw capabilities */
> +	snprintf(new_name, sizeof(new_name), "%s %s-%d",
> +			rtd->dai_link->stream_name, codec_dai->name, num);
> +	/* TODO add support for cature */

Meow :)

> +	printk(KERN_INFO "asoc: %s <-> %s mapping ok\n", codec_dai->name,
> +		cpu_dai->name);

Say it's a compressed mapping?

> +	if (cpu_dai->driver->compress_dai) {
> +		/*create compress device*/
> +		ret = soc_new_compress(rtd, num);
> +		if (ret < 0 ) {
> +			printk(KERN_ERR "asoc: can't create offload %s\n",
> +					 dai_link->stream_name);
> +			return ret;
> +		}

Should we be complaining here if there's PCM operations too?
Alternatively, should we support mixed PCM and compressed DAIs (possibly
be creating two pcms from a single dai_link)?

  reply	other threads:[~2012-08-02 18:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31  6:41 [RFC PATCH 0/2] ASoC: add compress stream support Vinod Koul
2012-07-31  6:41 ` [RFC PATCH 1/2] ASoC: add definitions for compressed operations Vinod Koul
2012-07-31  6:41 ` [RFC PATCH 2/2] ASoC: add compress stream support Vinod Koul
2012-08-02 18:09   ` Mark Brown [this message]
2012-08-02 19:31     ` Takashi Iwai
2012-08-03 10:20     ` Vinod Koul
2012-08-06  8:01     ` Takashi Iwai
2012-08-06 13:07       ` Mark Brown
2012-08-06  5:32   ` Vinod Koul
2012-08-06 12:59     ` Mark Brown
2012-08-06 16:46       ` Vinod Koul
2012-08-02 18:01 ` [RFC PATCH 0/2] " Mark Brown

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=20120802180926.GL4537@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.com \
    --cc=namartax.kohli@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ramesh.babu@intel.com \
    --cc=vinod.koul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).