linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: Lars-Peter Clausen <lars@metafoo.de>, alsa-devel@alsa-project.org
Cc: linux-omap@vger.kernel.org, broonie@kernel.org,
	liam.r.girdwood@linux.intel.com, peter.ujfalusi@ti.com
Subject: Re: [PATCH RFC (do not merge)] ASoC: davinci-mcasp: Set rule constraint if implicit bclk divider is used
Date: Fri, 13 Mar 2015 16:21:44 +0200	[thread overview]
Message-ID: <5502F278.2070608@ti.com> (raw)
In-Reply-To: <5502D052.1030804@metafoo.de>

On 03/13/15 13:56, Lars-Peter Clausen wrote:
> On 03/13/2015 12:36 PM, Jyri Sarha wrote:
> [...]
>> In theory this patch does exactly what it is supposed to. It only
>> allows a sample-rate and sample-format combination if the rate can be
>> produced with reasonable accuracy. Unfortunately the alsa-lib and
>> alsa-tools are not able use this information too well. If the requested
>> sample-rate and sample-format is not available the aplay/arecord
>> fails, even if plughw is selected, with:
>>
>> pcm_params.c:170: snd1_pcm_hw_param_get_min: Assertion
>> `!snd_interval_empty(i)' failed.
> [...]
>> +
>> +    /*
>> +     * If we rely on implicit BCLK divider setting we should
>> +     * set constraints based on what we can provide.
>> +     */
>> +    if (mcasp->bclk_master && mcasp->bclk_div == 0 &&
>> mcasp->sysclk_freq)
>> +        return snd_pcm_hw_rule_add(substream->runtime, 0,
>> +                       SNDRV_PCM_HW_PARAM_RATE,
>> +                       davinci_mcasp_hw_rule_rate,
>> +                       mcasp,
>> +                       SNDRV_PCM_HW_PARAM_FRAME_BITS,
>> +                       SNDRV_PCM_HW_PARAM_CHANNELS, -1);
>> +
>
> For things to work correctly you also need reverse rules restricting
> CHANNELS and FRAME_BITS based on the RATE. This might fix the issue you
> are seeing with the ALSA tools.
>

Thanks, that was indeed the case. I mail a new patch once I get my patch 
in order.

Best regards,
Jyri


      reply	other threads:[~2015-03-13 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 11:36 [PATCH RFC (do not merge)] ASoC: davinci-mcasp: Set rule constraint if implicit bclk divider is used Jyri Sarha
2015-03-13 11:56 ` Lars-Peter Clausen
2015-03-13 14:21   ` Jyri Sarha [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=5502F278.2070608@ti.com \
    --to=jsarha@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.ujfalusi@ti.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).