Re: Please help in adding ams-delta support to ASoC

2009-06-23 Thread Janusz Krzysztofik
Hi, Arun K S wrote: On Fri, Jun 19, 2009 at 4:20 AM, Janusz Krzysztofikjkrzy...@tis.icnet.pl wrote: After all, could someone please give me an advise, what tree, even with buggy omap1510 mcbsp/dsp support, should I base my work on for best results? You have to use current omap tree with the

Re: Please help in adding ams-delta support to ASoC

2009-06-22 Thread Jarkko Nikula
On Thu, 18 Jun 2009 13:40:56 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: Then I retired the same on the commit d8376cc482b241701f7606c81ad578b90853e175 and got similiar hangup. Next, I moved mcbsp initialization to a boot time hook and finally heard a sound and got my first DMA

Re: Please help in adding ams-delta support to ASoC

2009-06-19 Thread Janusz Krzysztofik
Tony Lindgren wrote: * Janusz Krzysztofik jkrzy...@tis.icnet.pl [090618 14:52]: Tony Lindgren wrote: On omap1, DSP needs to be powered and idled before some mcbsp clocks can be used. Or at least needs to be powered up. AFAICS there is no DSP code in mainline at all, so the answer is no, DSP

Re: Please help in adding ams-delta support to ASoC

2009-06-19 Thread Arun K S
On Fri, Jun 19, 2009 at 4:20 AM, Janusz Krzysztofikjkrzy...@tis.icnet.pl wrote: Tony Lindgren wrote: * Janusz Krzysztofik jkrzy...@tis.icnet.pl [090618 14:52]: Tony Lindgren wrote: On omap1, DSP needs to be powered and idled before some mcbsp clocks can be used. Or at least needs to be

Re: Please help in adding ams-delta support to ASoC

2009-06-18 Thread Jarkko Nikula
On Tue, 16 Jun 2009 16:43:53 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: - original patch ported to the last l-o commit supporting omap-alsa: - playback: works as before, - capture: both /dev/dsp and arecord give null output, but DMA interrupts still work. I can

Re: Please help in adding ams-delta support to ASoC

2009-06-18 Thread Janusz Krzysztofik
Jarkko Nikula wrote: Hmm, recall, did you try hacking the ASoC driver at the same commit d8376cc482b241701f7606c81ad578b90853e175 where older driver still exists and works? There has been ASoC OMAP fixes and changes since then but nothing which can explain why it doesn't work now for 1510.

Re: Please help in adding ams-delta support to ASoC

2009-06-18 Thread Arun K S
On Thu, Jun 18, 2009 at 4:40 AM, Janusz Krzysztofikjkrzy...@tis.icnet.pl wrote: Jarkko Nikula wrote: Hmm, recall, did you try hacking the ASoC driver at the same commit d8376cc482b241701f7606c81ad578b90853e175 where older driver still exists and works? There has been ASoC OMAP fixes and

Re: Please help in adding ams-delta support to ASoC

2009-06-16 Thread Janusz Krzysztofik
Jarkko Nikula wrote: On Mon, 15 Jun 2009 15:22:34 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: - original patch ported to the last l-o commit supporting omap-alsa: - playback: works as before, - capture: both /dev/dsp and arecord give null output, but DMA interrupts still

Re: Please help in adding ams-delta support to ASoC

2009-06-15 Thread Janusz Krzysztofik
Janusz Krzysztofik napisał(a): Important or not, I have to fine down my provious reports on what works and what does not: - original patch applied with other ams-delta related patches on linux-omap-2.6.16, as it was designed for: - playback: works, with both aplay and /dev/dsp, -

Re: Please help in adding ams-delta support to ASoC

2009-06-15 Thread Jarkko Nikula
On Mon, 15 Jun 2009 15:22:34 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: - original patch ported to the last l-o commit supporting omap-alsa: - playback: works as before, - capture: both /dev/dsp and arecord give null output, but DMA interrupts still work. Not that I

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-10 Thread Peter Ujfalusi
On Tuesday 09 June 2009 18:17:42 ext Janusz Krzysztofik wrote: Peter Ujfalusi wrote: I'm kind of bad at visualizing things, is it possible to put somewhere the screenshoot of the scope showing at least one sample? Good idea. I'll take some screenshots for future reference and let you know

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-10 Thread Janusz Krzysztofik
Hi Peter, Wednesday 10 June 2009 10:12:32 Peter Ujfalusi napisał(a): On Tuesday 09 June 2009 18:17:42 ext Janusz Krzysztofik wrote: +static struct omap_mcbsp_reg_cfg mcbsp_regs = { + .spcr2 = FREE | XINTM(3) | XRST, + .spcr1 = RINTM(3) | RRST, + .rcr1 = RFRLEN1(2 - 1) |

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-10 Thread Peter Ujfalusi
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:

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-10 Thread Janusz Krzysztofik
Peter Ujfalusi wrote: 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

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-10 Thread Janusz Krzysztofik
Janusz Krzysztofik wrote: Peter Ujfalusi wrote: I'm kind of bad at visualizing things, is it possible to put somewhere the screenshoot of the scope showing at least one sample? Good idea. I'll take some screenshots for future reference and let you know when available. Hi, Some screenshots

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-10 Thread Janusz Krzysztofik
Wednesday 10 June 2009 12:53:42 Peter Ujfalusi napisał(a): On Wednesday 10 June 2009 13:27:38 ext Janusz Krzysztofik wrote: 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

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-09 Thread Peter Ujfalusi
Hello Janusz, On Saturday 06 June 2009 20:42:12 ext Janusz Krzysztofik wrote: I'm not sure how that could happen, but I was wrong with some of those figures. After looking at the scope several more times I can only confirm that master clock really runs at 2MHz (0,5µs period). Frame sync is

Re: Please help in adding ams-delta support to ASoC

2009-06-09 Thread Janusz Krzysztofik
Jarkko Nikula wrote: On Sat, 6 Jun 2009 00:28:00 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: My last idea was to create a generic test driver that would not use any external clocks, ie configured with OMAP_MCBSP_SYSCLK_CLK and SND_SOC_DAIFMT_CBS_CFS, right? That way, it should just

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-09 Thread Janusz Krzysztofik
Peter Ujfalusi wrote: I'm kind of bad at visualizing things, is it possible to put somewhere the screenshoot of the scope showing at least one sample? Good idea. I'll take some screenshots for future reference and let you know when available. I have been looking for clues around the net,

Re: Please help in adding ams-delta support to ASoC

2009-06-08 Thread Jarkko Nikula
On Sat, 6 Jun 2009 00:28:00 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: Reviewing the code of different asoc omap drivers and mcbsp documentation again and again, several questions comes on mind, like: 1. What is the default setting for mcbsp master clock source? Assuming that

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-07 Thread Mark Brown
On Sat, Jun 06, 2009 at 07:42:12PM +0200, Janusz Krzysztofik wrote: Is it possible that the codec speeks I2S, with 8-bit word, 1 word per frame, 2 channels at 8kHz each? Or 1 channel at 16 kHz? From what I can read in modem documentation, this should rather be one 8-bit channel at 8kHz.

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-06 Thread Janusz Krzysztofik
Hi Mark, Saturday 06 June 2009 00:45:34 Mark Brown napisał(a): On Sat, Jun 06, 2009 at 12:28:00AM +0200, Janusz Krzysztofik wrote: On the codec frame sync output, I can see ~10kHz symmetric square wave (filled by 50%), the same on modem frame sync input, mcbsp1 status unknown. This shape

Re: Please help in adding ams-delta support to ASoC

2009-06-05 Thread Jarkko Nikula
On Wed, 3 Jun 2009 09:24:12 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: Thanks! The origial driver with commented out clk_enable(vc_clk) and clk_disable(vc_clk) still works for me, so MCLK is not required! If I only knew what to do with this finding... Optimize out one needless

Re: Please help in adding ams-delta support to ASoC

2009-06-05 Thread Janusz Krzysztofik
Hi Jarkko, Thank you for still trying to support my efforts. Friday 05 June 2009 15:55:31 Jarkko Nikula napisał(a): Optimize out one needless clock :-) :-) Ok, so looks that McBSP settings have nothing to do. That was what I was suggesting before as well, but now I'm back not so sure.

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-05 Thread Mark Brown
On Sat, Jun 06, 2009 at 12:28:00AM +0200, Janusz Krzysztofik wrote: On the codec frame sync output, I can see ~10kHz symmetric square wave (filled by 50%), the same on modem frame sync input, mcbsp1 status unknown. This shape suggests I2S protocol, not DSP_B as we deduced from the original

Re: Please help in adding ams-delta support to ASoC

2009-06-03 Thread Janusz Krzysztofik
Hi, Tuesday 02 June 2009 19:32:14 Jarkko Nikula wrote: It is not clear for me if MCLK is really used by the codec, or it is possible that it gets its master clock from an other, modem related source, and if this does really matter. Hmm. Are there any possibility that

Re: *SPAM* Re: Please help in adding ams-delta support to ASoC

2009-06-03 Thread Janusz Krzysztofik
Wednesday 03 June 2009 07:28:06 Peter Ujfalusi napisał(a): Looking at the code at commit: d8376cc482b241701f7606c81ad578b90853e175 on l-o the comment about the need for the call the omap_stop_dma puzzled me. Peter, It was omap_stop_alsa_sound_dma(), not just omap_stop_dma(), the was needed. In

Re: Please help in adding ams-delta support to ASoC

2009-06-02 Thread Peter Ujfalusi
On Monday 01 June 2009 21:04:13 ext Jarkko Nikula wrote: On Mon, 01 Jun 2009 14:41:59 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: The original patch ported to linux-omap-2.6.27, the last omap release with omap-alsa support, gives me a working sound driver on ams-delta. Ok, good

Re: Please help in adding ams-delta support to ASoC

2009-06-02 Thread Jarkko Nikula
On Mon, 1 Jun 2009 21:04:13 +0300 Jarkko Nikula jhnik...@gmail.com wrote: What I see at quick look from the older implementation that it is doing somewhat similar way the DMA transfer and workaround for 1510 than current ASoC except that now the DMA parameters are not reprogrammed between the

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-02 Thread Janusz Krzysztofik
Hi Mark, Wednesday 27 May 2009 12:47:11 Mark Brown wrote: On Tue, May 26, 2009 at 03:17:23PM +0200, Janusz Krzysztofik wrote: +static int cx20442_soc_probe(struct platform_device *pdev) +{ + struct snd_soc_device *socdev = platform_get_drvdata(pdev); + struct snd_soc_codec *codec;

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-02 Thread Mark Brown
On Tue, Jun 02, 2009 at 09:24:39AM +0200, Janusz Krzysztofik wrote: I have choosen to register the codec device with platform_device_register_simple(cx20442-codec, ...) invoked form asoc machine driver, is this ok? Normally the platform device would be registered by the machine file under

Re: *SPAM* Re: Please help in adding ams-delta support to ASoC

2009-06-02 Thread Janusz Krzysztofik
Hi Jarkko, Jarkko Nikula wrote: Is the older implementation working at commit d8376cc482b241701f7606c81ad578b90853e175 in linux-omap, i.e. last commit before their removal? I have managed to check with that revision this morning and yes, the driver is working. I'll try you other

Re: [alsa-devel] Please help in adding ams-delta support to ASoC

2009-06-02 Thread Janusz Krzysztofik
Hi Peter, Peter Ujfalusi wrote: On Wednesday 27 May 2009 16:07:23 ext Janusz Krzysztofik wrote: static struct omap_mcbsp_reg_cfg mcbsp_regs = { .spcr2 = FREE | XRST | GRST | XINTM(3) | FRST, .spcr1 = RINTM(3) | RRST, .rcr2 = RPHASE | RWDLEN2(OMAP_MCBSP_WORD_16) |

Re: Please help in adding ams-delta support to ASoC

2009-06-02 Thread Janusz Krzysztofik
Hi Jarkko, Jarkko Nikula wrote: On Mon, 1 Jun 2009 21:04:13 +0300 Jarkko Nikula jhnik...@gmail.com wrote: Hmm, I forgot one major difference. Older implementation was transferring the buffer by transferring periods by own DMA transfers while ASoC implementation is transferring the whole buffer

Re: Please help in adding ams-delta support to ASoC

2009-06-02 Thread Jarkko Nikula
On Tue, 02 Jun 2009 15:35:10 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: I am not sure if this is of any importance, but with the old working code, playing /dev/urandom to /dev/dsp I get only 3-4 DMA interrupts per second, while doing the same on a x86_64 via82cxxx results in 40-50

Re: *SPAM* Re: Please help in adding ams-delta support to ASoC

2009-06-02 Thread Peter Ujfalusi
Hello Janusz, On Tuesday 02 June 2009 13:50:50 ext Janusz Krzysztofik wrote: Hi Jarkko, Jarkko Nikula wrote: Is the older implementation working at commit d8376cc482b241701f7606c81ad578b90853e175 in linux-omap, i.e. last commit before their removal? I have managed to check with that

Re: Please help in adding ams-delta support to ASoC

2009-06-01 Thread Janusz Krzysztofik
Janusz Krzysztofik wrote: So I am going to restart with checking if the original patch still works with the latest kernel version supporting omap-alsa. The original patch ported to linux-omap-2.6.27, the last omap release with omap-alsa support, gives me a working sound driver on ams-delta.

Re: Please help in adding ams-delta support to ASoC

2009-06-01 Thread Jarkko Nikula
On Mon, 01 Jun 2009 14:41:59 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: The original patch ported to linux-omap-2.6.27, the last omap release with omap-alsa support, gives me a working sound driver on ams-delta. Ok, good to know. To make the original driver work stable, I had to

Re: Please help in adding ams-delta support to ASoC

2009-05-27 Thread Jarkko Nikula
Hi On Tue, 26 May 2009 15:17:23 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: Grr, these McBSP bits are always almost un-readable :-) 4. the following McBSP register settings changes: - .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) | - XWDLEN2(OMAP_MCBSP_WORD_16) |

Re: Please help in adding ams-delta support to ASoC

2009-05-27 Thread Janusz Krzysztofik
Hi Peter, On Wuesday 27 May 2009 07:57 Peter Ujfalusi wrote: On Tuesday 26 May 2009 16:17:23 ext Janusz Krzysztofik wrote: 4. the following McBSP register settings changes: - .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) | - XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG, +

Re: Please help in adding ams-delta support to ASoC

2009-05-27 Thread Janusz Krzysztofik
Hi Jarkko, On Wed, 27 May 2009 08:59 Jarkko Nikula wrote: On Tue, 26 May 2009 15:17:23 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: - .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) | - XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG, + .xcr2 = XPHASE |

Re: Please help in adding ams-delta support to ASoC

2009-05-27 Thread Jarkko Nikula
On Wed, 27 May 2009 16:33:22 +0200 Janusz Krzysztofik jkrzy...@tis.icnet.pl wrote: - .srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1), + .srgr2 = GSYNC, - .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */ ... I wonder why the frame sync period (FWID) wasn't set in

Re: Please help in adding ams-delta support to ASoC

2009-05-27 Thread Janusz Krzysztofik
Hi, Tired with hopeless looking for the correct mcbsp dai format, I took the oposite direciton, trying to break what Mark Underwood had managed to get working. Step by step, I got to exactly the same mcbsp register configuration as used in the reference osk board, reverting all changes that

Please help in adding ams-delta support to ASoC

2009-05-26 Thread Janusz Krzysztofik
Hi, I am trying to add sound support for ams-delta omap machine, yet without much success. Three years ago, Mark Underwood created an omap-alsa compatible driver that basically worked[1]. It was derieved from similiar driver for aic23 codec found on omap osk machine. It looks like Mark has

Re: Please help in adding ams-delta support to ASoC

2009-05-26 Thread Peter Ujfalusi
On Tuesday 26 May 2009 16:17:23 ext Janusz Krzysztofik wrote: Hi, I am trying to add sound support for ams-delta omap machine, yet without much success. Three years ago, Mark Underwood created an omap-alsa compatible driver that basically worked[1]. It was derieved from similiar driver for