Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
	Hardik T Shah <hardik.t.shah@intel.com>,
	liam.r.girdwood@linux.intel.com, patches.audio@intel.com,
	Jeeja KP <jeeja.kp@intel.com>
Subject: Re: [RFC 6/7] ASoC: hda: Add support for SSP register settings
Date: Sun, 26 Apr 2015 19:48:31 +0530	[thread overview]
Message-ID: <20150426141831.GS2738@intel.com> (raw)
In-Reply-To: <20150424175532.GD22845@sirena.org.uk>


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

On Fri, Apr 24, 2015 at 06:55:32PM +0100, Mark Brown wrote:
> On Sun, Apr 19, 2015 at 02:27:32AM +0530, Vinod Koul wrote:
> 
> > +	req_bclk = fs * slots * s_fmt;
> 
> We have a helper for this.
will use
> 
> > +	dummy = 0;
> > +	/* Find the lowest bit clock possible for particular configuration */
> > +	do {
> > +		req_bclk = ((s_fmt * fs * slots) + (fs * dummy));
> > +		mod = HDA_SSP_MAX_FREQ_192 % req_bclk;
> > +		divisor = HDA_SSP_MAX_FREQ_192 / req_bclk;
> > +		if (!mod) {
> > +			found = 1;
> > +			break;
> > +		}
> > +		/* Dont add odd number of dummy bits, since I2S requires
> > +		 * dummy bit after each slot/channel
> > +		 */
> 
> It does?
For us unfortuntely yes. We send 24 bit audio to codec and clock divider
doesn't give us 48clocks per frame, so we have to add dummy clocks in each
slot and send 25 clocks per slot

> > +		dummy += 2;
> > +		if (dummy > (HDA_SSPSP2_FEP_MASK >> HDA_SSPSP2_FEP_SHIFT)) {
> > +			dev_err(ctx->dev, "Dummy bit greater than what SSP can support\n");
> > +			return -EINVAL;
> > +		}
> > +
> > +	} while (divisor > 0);
> 
> Aside from the limits this all looks like it could be generic?
sure will try to do that.

Thanks
-- 
~Vinod

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

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



  reply	other threads:[~2015-04-26 14:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-18 20:57 [RFC 0/7] ASoC: hda - ASoC DSP widget event handlers Vinod Koul
2015-04-18 20:57 ` [RFC 1/7] ASoC: hda: Add skl dsp init and registering with SST IPC lib Vinod Koul
2015-04-24 17:36   ` Mark Brown
2015-04-26 13:53     ` Vinod Koul
2015-04-18 20:57 ` [RFC 2/7] ASoC: hda: add helper to configure module params Vinod Koul
2015-04-24 17:38   ` Mark Brown
2015-04-26 14:06     ` Vinod Koul
2015-04-18 20:57 ` [RFC 3/7] ASoC: hda: add FW module init/bind IPC Vinod Koul
2015-04-18 20:57 ` [RFC 4/7] ASoC: hda: add FW pipe create/delete/set_pipe_state IPC Vinod Koul
2015-04-18 20:57 ` [RFC 5/7] ASOC: hda: add DSP platfrom controls widget event handlers Vinod Koul
2015-04-24 17:51   ` Mark Brown
2015-04-26 14:14     ` Vinod Koul
2015-04-18 20:57 ` [RFC 6/7] ASoC: hda: Add support for SSP register settings Vinod Koul
2015-04-24 17:55   ` Mark Brown
2015-04-26 14:18     ` Vinod Koul [this message]
2015-04-27 14:15       ` Mark Brown
2015-04-29 23:45         ` Pierre-Louis Bossart
2015-04-29 23:50           ` Pierre-Louis Bossart
2015-04-30  4:39             ` Vinod Koul
2015-04-30 14:36               ` Mark Brown
2015-04-30 15:55                 ` Pierre-Louis Bossart
2015-04-18 20:57 ` [RFC 7/7] ASoC: hda: Apply dai params_fixup for DSP widgets Vinod Koul

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=20150426141831.GS2738@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=hardik.t.shah@intel.com \
    --cc=jeeja.kp@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    /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