All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Flax <flatmax@flatmax.org>
To: alsa-devel@alsa-project.org
Subject: ASoC : question about custom rate
Date: Tue, 09 Sep 2014 18:43:36 +1000	[thread overview]
Message-ID: <540EBDB8.20507@flatmax.org> (raw)

Hi there,

I have an ASIC running on an ASoC with a custom rate @ 18750 Hz.
I would like ALSA to report the correct rate.

If I do nothing, then the following reports 16000 Hz :
cat /proc/asound/card0/pcm0c/sub0/hw_params

I have verified that the hardware is running at the expected 18750 Hz.
I am wondering what/where is the correct place to setup the actual rate ?

I am trying to set the rates at startup like so but ALSA will not work 
with the driver when I do this :

static int implant_startup(struct snd_pcm_substream *substream, struct 
snd_soc_dai *dai)
{
     snd_pcm_hw_constraint_minmax(substream->runtime, 
SNDRV_PCM_HW_PARAM_RATE, 18750, 18750);
     snd_pcm_hw_constraint_minmax(substream->runtime, 
SNDRV_PCM_HW_PARAM_CHANNELS, 2, 2);
     snd_pcm_hw_constraint_minmax(substream->runtime, 
SNDRV_PCM_HW_PARAM_SAMPLE_BITS, 16, 16);

     return 0;
}

static const struct snd_soc_dai_ops implant_dai_ops = {
     .set_fmt    = implant_set_dai_fmt,
     .startup = implant_startup,
};

thanks
Matt

             reply	other threads:[~2014-09-09  8:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09  8:43 Matt Flax [this message]
2014-09-09 10:44 ` ASoC : question about custom rate Lars-Peter Clausen
2014-09-09 23:45   ` Matt Flax
2014-09-10  6:22     ` Lars-Peter Clausen

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=540EBDB8.20507@flatmax.org \
    --to=flatmax@flatmax.org \
    --cc=alsa-devel@alsa-project.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 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.