Re: State of the MPC5200 PSC AC97 driver
On Tuesday 15 April 2008 10:03, Juergen Beisert wrote: > Currently it fails to play anything with an external Wolfson WM9712 > connected to it. It seems the current AC97 reset sequence switches the > WM9712 into testmode due to SDATA_OUT and Sync are not held low while the > reset is active. Any idea to solve this? Switching both signals to GPIO and > force them to low level while reset is active? How to cover PSC1 and PSC2 > with different GPIOs for this case? Cannot reproduce the reset issue now, but in my case the bestcomm was programmed to service the wrong PSC unit. That was the reason I never heard any sound. Can us give the oftree a better differentiation to program the bestcomm in a correct manner? Subject: [EMAIL PROTECTED]@/@[EMAIL PROTECTED] mpc52xx: Change the AC97 driver to be more generic From: Juergen Beisert <[EMAIL PROTECTED]> The current AC97 driver for the mpc52xx CPU is fixed to work on PSC2. This patch tries to make it more generic, as it detects the PSC unit for AC97 usage to forward this information into the Bestcomm-API. Signed-off-by: Juergen Beisert <[EMAIL PROTECTED]> --- sound/ppc/mpc52xx_ac97.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) Index: sound/ppc/mpc52xx_ac97.c === --- sound/ppc/mpc52xx_ac97.c.orig +++ sound/ppc/mpc52xx_ac97.c @@ -651,6 +651,7 @@ mpc52xx_ac97_probe(struct of_device *op, struct mpc52xx_ac97_priv *priv; struct snd_card *card; struct resource res; + int tx_initiator; int rv; dev_dbg(&op->dev, "probing MPC52xx PSC AC97 driver\n"); @@ -699,10 +700,27 @@ mpc52xx_ac97_probe(struct of_device *op, /* Setup Bestcomm tasks */ spin_lock_init(&priv->dma_lock); + /* +* PSC1 or PSC2 can be configured for AC97 usage. Select the right +* channel, to let the BCOMM unit does its job correctly. +*/ + switch (priv->mem_start & 0x) { + case 0x2000:/* PSC1 */ + tx_initiator = 14; + break; + case 0x2200:/* PSC2 */ + tx_initiator = 12; + break; + default: + dev_dbg(priv->dev, "Unknown PSC unit for AC97 usage!\n"); + rv - ENODEV; + goto err_irq; + } + priv->tsk_tx = bcom_gen_bd_tx_init(AC97_TX_NUM_BD, priv->mem_start + offsetof(struct mpc52xx_psc, tfdata), - 12, /* initiator : FIXME */ + tx_initiator, 2); /* ipr : FIXME */ if (!priv->tsk_tx) { printk(KERN_ERR DRV_NAME ": bcom_gen_bd_tx_init failed\n"); @@ -759,6 +777,7 @@ err_irqreq: bcom_gen_bd_tx_release(priv->tsk_tx); err_bcomm: mpc52xx_ac97_hwshutdown(priv); +err_irq: irq_dispose_mapping(priv->irq); err_irqmap: iounmap(priv->psc); Juergen -- Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Vertretung Sued/Muenchen, Germany Phone: +49-8766-939 228 | Fax: +49-5121-206917-9 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: State of the MPC5200 PSC AC97 driver
On Friday 11 April 2008 09:29, Sylvain Munaut wrote: > > Last year you have posted a MPC5200 PSC AC97 driver patch > > "[PATCH 9/9] sound: Add support for Freescale MPC5200 AC97 interface." > > > > with the following comment: > >> Not quite a clean driver, but it get things done (well, mostly). > >> Only included to be able to test functionalityi/usage of > >> the BestComm driver. > > Yes ... and it still applies. > > > There are various FIXMEs and commented out code here and there. > > Could you elaborate a bit on the overall state of the driver's > > functionality, > > which areas need improvement and attention? > > It's a minimum boiler plate. > I filled the function at the minimum to get some sound output and being > able to hear music coming out of it :) > I also completely skipped the 5200 (not B) support ... > > At first there was no DMA at all (full software copy). I added some > simple DMA later just to prove it could work and how to use the API. > > I just wrote it to get some sound, prove the interface could work under > linux and to show how to use DMA. I had hoped someone else would finish > it ... (yeah, I know ... big mistake). > > > Seems that you mainly tested BestComm with this driver, what was the > > overall > > BestComm performance, any issues here? Did you use any specific test > > setup involving some dedicated application, etc.? > > My test was listening to Gorrillaz "Feel Good inc" using mplayer ... > > > Did anyone else tried it and/or has a updated version or can share > > experience? > > At the time several other people tried it and it worked ... unless you > did lots of harddrive IO and then it crumbled ... Currently it fails to play anything with an external Wolfson WM9712 connected to it. It seems the current AC97 reset sequence switches the WM9712 into testmode due to SDATA_OUT and Sync are not held low while the reset is active. Any idea to solve this? Switching both signals to GPIO and force them to low level while reset is active? How to cover PSC1 and PSC2 with different GPIOs for this case? Juergen -- Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Vertretung Sued/Muenchen, Germany Phone: +49-8766-939 228 | Fax: +49-5121-206917-9 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: State of the MPC5200 PSC AC97 driver
Grant Likely wrote: > On Fri, Apr 11, 2008 at 3:23 AM, Marian Balakowicz <[EMAIL PROTECTED]> wrote: >> All, >> >> Thanks for the input and comments. >> >> I am also having a look at the I2S driver. There were attempts some >> time ago and I found few pieces of code floating on net but couldn't >> find anything cleaned up. Did anyone tried to put the results of those >> attempts together? > > I'm actually working on the I2S driver now and I'll probably have > something to post about a month from now. This is funded development, > so I'll actually have lots of time to spend on it when I get back from > ELC. Nice, I'll most probably work on it quite soon as well. It would be good to coordinate efforts, will ping you when I am about to start. Cheers, m. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: State of the MPC5200 PSC AC97 driver
On Fri, Apr 11, 2008 at 3:23 AM, Marian Balakowicz <[EMAIL PROTECTED]> wrote: > > All, > > Thanks for the input and comments. > > I am also having a look at the I2S driver. There were attempts some > time ago and I found few pieces of code floating on net but couldn't > find anything cleaned up. Did anyone tried to put the results of those > attempts together? I'm actually working on the I2S driver now and I'll probably have something to post about a month from now. This is funded development, so I'll actually have lots of time to spend on it when I get back from ELC. Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: State of the MPC5200 PSC AC97 driver
All, Thanks for the input and comments. I am also having a look at the I2S driver. There were attempts some time ago and I found few pieces of code floating on net but couldn't find anything cleaned up. Did anyone tried to put the results of those attempts together? Cheers, m. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: State of the MPC5200 PSC AC97 driver
On Fri, Apr 11, 2008 at 08:51:00AM +0200, Robert Schwebel wrote: > Hi Matt, > > On Thu, Apr 10, 2008 at 04:25:20PM +0100, Matt Sealey wrote: > > I have a copy of the driver I hacked to work with the new PSC > > framework but it doesn't "work" anymore - I have no idea why. > > > > Mail me privately if you want it, I have no time to make patches or > > look for a good reason for the breakages, but it compiles at least. > > The Efika hack should be gone now (irrelevant since we released a > > firmware that obseletes it) and the other fixmes should be by the > > wayside considering the fscking thing doesn't play sound anymore... > > I'd be interested as well; do I read your mail right that you have > already managed to hear sound coming out of the MPC5200B PSC AC97 > interface? You would be the first one I've heared of, so it would > definitely be interesting to see your code. Indeed, sound was known to work on the efika plateform, altough it is the last patch which not merged upstream, and needs some work. I leave matt send it to you, as he has been more in touch with this lately. Friendly, Sven Luther ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: State of the MPC5200 PSC AC97 driver
> Last year you have posted a MPC5200 PSC AC97 driver patch > "[PATCH 9/9] sound: Add support for Freescale MPC5200 AC97 interface." > with the following comment: > > >> Not quite a clean driver, but it get things done (well, mostly). >> Only included to be able to test functionalityi/usage of >> the BestComm driver. >> Yes ... and it still applies. > > There are various FIXMEs and commented out code here and there. > Could you elaborate a bit on the overall state of the driver's > functionality, > which areas need improvement and attention? > It's a minimum boiler plate. I filled the function at the minimum to get some sound output and being able to hear music coming out of it :) I also completely skipped the 5200 (not B) support ... At first there was no DMA at all (full software copy). I added some simple DMA later just to prove it could work and how to use the API. I just wrote it to get some sound, prove the interface could work under linux and to show how to use DMA. I had hoped someone else would finish it ... (yeah, I know ... big mistake). > Seems that you mainly tested BestComm with this driver, what was the > overall > BestComm performance, any issues here? Did you use any specific test setup > involving some dedicated application, etc.? > My test was listening to Gorrillaz "Feel Good inc" using mplayer ... > Did anyone else tried it and/or has a updated version or can share > experience? > At the time several other people tried it and it worked ... unless you did lots of harddrive IO and then it crumbled ... Sylvain ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: State of the MPC5200 PSC AC97 driver
Hi Matt, On Thu, Apr 10, 2008 at 04:25:20PM +0100, Matt Sealey wrote: > I have a copy of the driver I hacked to work with the new PSC > framework but it doesn't "work" anymore - I have no idea why. > > Mail me privately if you want it, I have no time to make patches or > look for a good reason for the breakages, but it compiles at least. > The Efika hack should be gone now (irrelevant since we released a > firmware that obseletes it) and the other fixmes should be by the > wayside considering the fscking thing doesn't play sound anymore... I'd be interested as well; do I read your mail right that you have already managed to hear sound coming out of the MPC5200B PSC AC97 interface? You would be the first one I've heared of, so it would definitely be interesting to see your code. Robert -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: State of the MPC5200 PSC AC97 driver
I have a copy of the driver I hacked to work with the new PSC framework but it doesn't "work" anymore - I have no idea why. Mail me privately if you want it, I have no time to make patches or look for a good reason for the breakages, but it compiles at least. The Efika hack should be gone now (irrelevant since we released a firmware that obseletes it) and the other fixmes should be by the wayside considering the fscking thing doesn't play sound anymore... -- Matt Sealey <[EMAIL PROTECTED]> Genesi, Manager, Developer Relations Marian Balakowicz wrote: Hi Sylvain, Last year you have posted a MPC5200 PSC AC97 driver patch "[PATCH 9/9] sound: Add support for Freescale MPC5200 AC97 interface." with the following comment: Not quite a clean driver, but it get things done (well, mostly). Only included to be able to test functionalityi/usage of the BestComm driver. There are various FIXMEs and commented out code here and there. Could you elaborate a bit on the overall state of the driver's functionality, which areas need improvement and attention? Seems that you mainly tested BestComm with this driver, what was the overall BestComm performance, any issues here? Did you use any specific test setup involving some dedicated application, etc.? Did anyone else tried it and/or has a updated version or can share experience? Thanks in advance. Cheers, m. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: State of the MPC5200 PSC AC97 driver
On Thu, Apr 10, 2008 at 12:44:43PM +0200, Marian Balakowicz wrote: > Last year you have posted a MPC5200 PSC AC97 driver patch > "[PATCH 9/9] sound: Add support for Freescale MPC5200 AC97 interface." > with the following comment: > > > Not quite a clean driver, but it get things done (well, mostly). > > Only included to be able to test functionalityi/usage of > > the BestComm driver. > > There are various FIXMEs and commented out code here and there. > Could you elaborate a bit on the overall state of the driver's > functionality, > which areas need improvement and attention? > > Seems that you mainly tested BestComm with this driver, what was the > overall > BestComm performance, any issues here? Did you use any specific test setup > involving some dedicated application, etc.? > > Did anyone else tried it and/or has a updated version or can share > experience? Sidenote: last time we tried (2.6.23.1), the AC97 driver didn't work, tested on the phyCORE-MPC5200B-tiny board. No sound, just a little bit noise which can be muted with the mixer. And music finishes about 7 times as fast as it usually should. So we didn't manage to make it work yet. Robert -- Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Hannoversche Str. 2, 31134 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
State of the MPC5200 PSC AC97 driver
Hi Sylvain, Last year you have posted a MPC5200 PSC AC97 driver patch "[PATCH 9/9] sound: Add support for Freescale MPC5200 AC97 interface." with the following comment: > Not quite a clean driver, but it get things done (well, mostly). > Only included to be able to test functionalityi/usage of > the BestComm driver. There are various FIXMEs and commented out code here and there. Could you elaborate a bit on the overall state of the driver's functionality, which areas need improvement and attention? Seems that you mainly tested BestComm with this driver, what was the overall BestComm performance, any issues here? Did you use any specific test setup involving some dedicated application, etc.? Did anyone else tried it and/or has a updated version or can share experience? Thanks in advance. Cheers, m. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev