public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: ext Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"alsa-devel@vger.kernel.org" <alsa-devel@vger.kernel.org>
Subject: Re: [alsa-devel] Please help in adding ams-delta support to ASoC
Date: Wed, 10 Jun 2009 13:53:42 +0300	[thread overview]
Message-ID: <200906101353.43411.peter.ujfalusi@nokia.com> (raw)
In-Reply-To: <200906101227.39856.jkrzyszt@tis.icnet.pl>

On Wednesday 10 June 2009 13:27:38 ext Janusz Krzysztofik wrote:
> Not only this. AFAICS, there is no way of specifying single phase stereo
> (with XPHASE/RPHASE unset), 2 words per frame (XFRLEN1/RFRLEN1(2 - 1)).
> Isn't this required for correct DSP_A/DSP_B support?

Sure it is possible:
	format = mcbsp_data->fmt & SND_SOC_DAIFMT_FORMAT_MASK;
	wpf = channels = params_channels(params);
	switch (channels) {
	case 2:
		if (format == SND_SOC_DAIFMT_I2S) {
			/* Use dual-phase frames */
			regs->rcr2	|= RPHASE;
			regs->xcr2	|= XPHASE;
			/* Set 1 word per (McBSP) frame for phase1 and phase2 */
			wpf--;
			regs->rcr2	|= RFRLEN2(wpf - 1);
			regs->xcr2	|= XFRLEN2(wpf - 1);
		}
	case 1:
	case 4:
		/* Set word per (McBSP) frame for phase1 */
		regs->rcr1	|= RFRLEN1(wpf - 1);
		regs->xcr1	|= XFRLEN1(wpf - 1);
		break;
	default:
		/* Unsupported number of channels */
		return -EINVAL;
	}

wpf = channels == 2, format is not I2S --> RFRLEN1(wpf - 1), XFRLEN1(wpf - 1), 
RFRLEN1(2 - 1), XFRLEN1(2 - 1)

>
> > But you should be able to use the playback with the current ASoC.
>
> Definitelly yes. I am aware that the above limitations have nothing to do
> with the main problem, as with current mcbsp code I should always be able
> to get some kind of noise at least using one of supported formats, as far
> as clocking is set up correctly.
>
> > --- a/arch/arm/plat-omap/dma.c
> > +++ b/arch/arm/plat-omap/dma.c
> > @@ -266,6 +266,8 @@ void omap_set_dma_transfer_params(int lch, int
> > data_type, int elem_count,
> >                 ccr &= ~(1 << 5);
> >                 if (sync_mode == OMAP_DMA_SYNC_FRAME)
> >                         ccr |= 1 << 5;
> > +               if (dma_trigger)
> > +                       ccr |= dma_trigger & 0x1f;
> >                 dma_write(ccr, CCR(lch));
> >
> >                 ccr = dma_read(CCR2(lch));
>
> Applied, sorry, did not help (with capture, unlike playback, set up for
> internal clocking for as much device isolation as possible).

I would have guessed this, since even when the DMA was not HW synced, it did 
not sent a single bit to the McBSP DXR1 register...

Just out of curiosity, can you try this one as well:

--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -191,6 +191,7 @@ static int omap_mcbsp_dai_trigger(struct snd_pcm_substream 
*substream, int cmd,
        case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
                if (!mcbsp_data->active++)
                        omap_mcbsp_start(mcbsp_data->bus_id);
+               omap_mcbsp_pollwrite(mcbsp_data->bus_id, 0xdb55);
                break;

basically write 0xdb55 to the DXR1 register (0xdb55 is 1101101101010101)
With this, if McBSP is operating correctly you should be seeing this pattern 
going to the codec. If it does, than we have some problems with the McBSP/DMA 
cooperation, if this pattern is not seen on the bus, than the McBSP is not 
shifting data out for some reason.

>
> > I would expected that by just copying (I know that there are other things
> > involved) the old ALSA arm directory to the latest kernel and compiling
> > it should be working... It seams I was wrong.
>
> Anyway, if you find porting one or another framework, back or forward,
> helpfull in any way, just let me know, I can try.

I'm not sure if it could prove anything at the end. There are - I think - 
other moving parts, which can break things.

>
> Thanks,
> Janusz

-- 
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-06-10 10:54 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 13:17 Please help in adding ams-delta support to ASoC Janusz Krzysztofik
2009-05-27  5:57 ` Peter Ujfalusi
2009-05-27 13:07   ` Janusz Krzysztofik
2009-06-02  5:47     ` Peter Ujfalusi
2009-06-02 11:38       ` Janusz Krzysztofik
2009-05-27  6:59 ` Jarkko Nikula
2009-05-27 14:33   ` Janusz Krzysztofik
2009-05-27 15:19     ` Jarkko Nikula
2009-05-27 18:58   ` Janusz Krzysztofik
2009-06-01 12:41     ` Janusz Krzysztofik
2009-06-01 18:04       ` Jarkko Nikula
2009-06-02  6:08         ` Peter Ujfalusi
2009-06-02  6:22         ` Jarkko Nikula
2009-06-02 13:35           ` Janusz Krzysztofik
2009-06-02 17:32             ` Jarkko Nikula
2009-06-03  7:24               ` Janusz Krzysztofik
2009-06-05 13:55                 ` Jarkko Nikula
2009-06-05 22:28                   ` Janusz Krzysztofik
2009-06-05 22:45                     ` [alsa-devel] " Mark Brown
2009-06-06 17:42                       ` Janusz Krzysztofik
2009-06-07  9:40                         ` Mark Brown
2009-06-09  7:12                         ` Peter Ujfalusi
2009-06-09 15:17                           ` [alsa-devel] " Janusz Krzysztofik
2009-06-10  8:12                             ` Peter Ujfalusi
2009-06-10 10:27                               ` [alsa-devel] " Janusz Krzysztofik
2009-06-10 10:53                                 ` Peter Ujfalusi [this message]
2009-06-10 12:20                                   ` Janusz Krzysztofik
2009-06-10 18:05                                   ` Janusz Krzysztofik
2009-06-10 14:20                             ` Janusz Krzysztofik
2009-06-08  6:40                     ` Jarkko Nikula
2009-06-09 15:00                       ` Janusz Krzysztofik
2009-06-15 13:22                         ` Janusz Krzysztofik
2009-06-15 15:16                           ` Jarkko Nikula
2009-06-16 14:43                             ` Janusz Krzysztofik
2009-06-17 14:12                               ` Progress in adding ams-delta support to ASoC? Janusz Krzysztofik
2009-06-18  9:02                                 ` Peter Ujfalusi
2009-06-18  7:58                                   ` Tony Lindgren
2009-06-18 11:51                                     ` Janusz Krzysztofik
2009-06-18 10:21                                       ` Tony Lindgren
2009-06-18  6:07                               ` Please help in adding ams-delta support to ASoC Jarkko Nikula
2009-06-18 11:40                                 ` Janusz Krzysztofik
2009-06-19  3:50                                   ` Arun K S
2009-06-19 11:20                                     ` Janusz Krzysztofik
2009-06-19 18:55                                       ` Arun K S
2009-06-22 11:47                                   ` Jarkko Nikula
2009-06-23 11:58                                     ` Janusz Krzysztofik
2009-06-02 10:50         ` *SPAM* " Janusz Krzysztofik
2009-06-03  5:28           ` Peter Ujfalusi
2009-06-03  8:28             ` Janusz Krzysztofik
     [not found] ` <20090527104711.GA1970@sirena.org.uk>
2009-06-02  7:24   ` Janusz Krzysztofik
2009-06-02  9:37     ` 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=200906101353.43411.peter.ujfalusi@nokia.com \
    --to=peter.ujfalusi@nokia.com \
    --cc=alsa-devel@vger.kernel.org \
    --cc=jkrzyszt@tis.icnet.pl \
    --cc=linux-omap@vger.kernel.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