Linux Audio Xilinx board

Prakash N npk_0 at yahoo.co.in
Mon Jun 19 14:49:24 EST 2006


 Hi all,
 I'm developing an IP Phone which has to be optimized for cost.  I thought of prototyping, the application on Xilinx Board (http://www.xilinx.com/univ/xupv2p.html (or) www.digilentinc.com/xupv2p). Xilinx had given the OS support thro' Montavista, VxWorks. The montavista Linux which is supported & "open source" is available with the kernel 2.4.26. I used www.eecs.wsu.edu/~jamie/research/LinuxPort/linux_port.htm as a reference for porting linux on xilinx board. Since I'm more into VLSI than embedded designs I dont know much about the later.
 
 Now coming to problem, Xilinx had given BSPs for Ethernet, UART, Compact Flash etc , which I can replace it in the Montavista distribution and I can configure and compile the kernel for the same. What I mean here is the montavista linux distribution doesnt have the xilinx BSPs, which I need to put in their distribution, before configuration & compilation. But the Xilinx had not given the BSP for Audio Codec, which is available in the board.
 
 But as per the work done by Jamie, http://www.eecs.wsu.edu/~jamie/research/designs/audio_test /Audio%20Test.doc
 http://www.eecs.wsu.edu/~jamie/research/designs/audio_test/7.1i.zip
 
Coming to my application, Linphone (www.linphone.org), an open source
VoIP phone, I could compile and run it on FC4 Linux x86 computer. Also
I cross compiled the same on powerPC-405 platform using cross
compiling tools. Since audio support/device driver is not provided
under montavista (compatible to Xilinx board) I couldnt test the
audio, which is very important in phone kind of products.
I could see the ac97 Codec (LM4550 chip) in the board. Also I could
see ac97 related files in two places,
1) Under Xilinx supplied software
2) Under Montavista Linux distribution

Probably I may need to  change the ac97 files in montavista with "some
modifications" in Xilinx provided files. Here "some modifications" is
the advice given by Jamie (transcript is given below), which she had
stopped replying after some time.

I\'d attached the
1.Xilinx provided BSPs which I replace in monta vista distribution.
(attached as temp.zip)
2.ac97 files provided by Xilinx (xac97_l.c & xac97_l.h)
3.ac97 related files by Montavista  (ac97*.*) as given in
linuxppc_2_4_devel folder

The linphone is trying to check /dev/dsp for audio i/o and I just need
OSS rather ALSA, as later is not supported in Linux 2.4.

Now if you can say how can I make a driver / adapter in linux for
Linphone, so that it can access the xilinx board specific Audio Codec.

------------------------------------------------------------------------------------------------------------------------
Transcripts of mails with Jamie
------------------------------------------------------------------------------------------------------------------------Prakash,

- Hide quoted text -
",1] );  //-->I could able to test the Mic (Mike, Speaker input) & speaker (speaker  output), as a stand alone application (not on linux) running on board. 

Coming to my application, Linphone (www.linphone.org), an open source VoIP phone, I could compile and run it on FC4 Linux x86 computer. Also I cross compiled the same on powerPC-405 platform using cross compiling tools. Since audio support/device driver is not provided under montavista (compatible to Xilinx board) I couldnt test the audio, which is very important in phone kind of products.
I could see  the ac97  Codec (LM4550 chip) in the board. Also I could see ac97 related  files in two places, 
1) Under Xilinx supplied software
2) Under Montavista  Linux distribution

Probably I may need to change the ac97 files in montavista with "some modifications" in Xilinx provided files. Here "some modifications" is the advice given by Jamie (transcript is given below), which she had stopped replying after some time.

The linphone is trying to check /dev/dsp for audio i/o and I just need OSS rather ALSA, as later is not supported in Linux 2.4.

Now if you can say how can I make a driver / adapter in linux for Linphone, so that it can access the xilinx board specific Audio Codec.
 Also I want to know whether there is Linux 2.6 version available for xilinx board, which does have the BSPs for the same.

------------------------------------------------------------------------------------------
Transcripts  of mails with  Jamie
 ------------------------------ ------------------------------------------------------------

Prakash,

Sorry about the delay. I was out of town for a while.
If you track down Xilinx device driver functions, you\'ll
see that they use their own IO functions. These functions
are specific to Xilinx products, and so they can\'t be used directly
under Linux. The memory mapped IO driver I wrote can be used to
replace these functions. You basically create a character device on
your own, so that the device can be read/write in Linux. I assume you
have a good
programming knowledge, so just look into the AC97
device driver, and track down to the lowest level IO.
>From there, use the Linux IO driver to  replace these functions. I hope
this helps.

-Jamie


----- Original Message -----
From: "Prakash N" <nprakash at cedt.iisc.ernet.in>
To: "Jamie Lin" <jamiehl at mail.wsu.edu>
Sent: Thursday, May 04, 2006 11:16 PM
Subject: RE: XILINX board-Audio Codec-Linux driver support


> Jamie,
> Could you please brief me how can I proceed in developing the
> driver/adapter for linux-xilinx combination. Just give me some steps
> for this audio support. Like, just outline what I need to do, then I
> can proceed. I feel I may have to modify/add xilinx hardware related
> stuff to AC97 general linux drivers.
> Please guide  me in this.
> Sincerely,
> Prakash
>
> -----Original Message-----
> From: Jamie Lin [mailto:jamiehl at mail.wsu.edu]
> Sent: Monday, May 01, 2006 10:25 PM
> To: Prakash N
> Subject: Re: XILINX board-Audio Codec-Linux driver support
>
>
> No, you can\'t just use these files under Linux. Xilinx has its way of
",1] );  //--> 
Sorry about the delay. I was out of town for a while.
If you track down  Xilinx device driver functions, you'll
see that they use their own IO  functions. These functions
are specific to Xilinx products, and so they can't  be used directly
under Linux. The memory mapped IO driver I wrote can be used  to
replace these functions. You basically create a character device  on
your own, so that the device can be read/write in Linux.  I assume  you
have a good
programming knowledge, so just look into the  AC97
device driver, and track down to the lowest level IO.
>From there, use  the Linux IO driver to replace these functions. I hope
this  helps.

-Jamie


----- Original Message -----
From: "Prakash  N" <nprakash at cedt.iisc.ernet.in>
To:  "Jamie Lin" <jamiehl at mail.wsu.edu>
Sent:  Thursday, May 04, 2006 11:16 PM
Subject: RE: XILINX board-Audio Codec-Linux  driver support


> Jamie,
> Could you please brief me how can  I proceed in developing the
> driver/adapter for linux-xilinx combination.  Just give me some steps
> for this audio support. Like, just outline what  I need to do, then I
> can proceed. I feel I may have  to modify/add xilinx  hardware related
> stuff to AC97 general linux drivers.
> Please  guide me in this.
> Sincerely,
> Prakash
>
>  -----Original Message-----
> From: Jamie Lin [mailto:jamiehl at mail.wsu.edu]
> Sent:  Monday, May 01, 2006 10:25 PM
> To: Prakash N
> Subject: Re: XILINX  board-Audio Codec-Linux driver support
>
>
> No, you can't  just use these files under Linux. Xilinx has its way of
 > be used to make Xilinx drivers. All drivers in EDK only work under
> specific Xilinx platforms. That\'s why when we want to run Ethernet in
> Linux, we need to copy BSP to Linux, so that it knows a specific type
> of Ethernet needs to be made. We only replace files that  comes with
> BSP in Linux. The rest of driver files in Linux are used to adapt the
> device. If mv_linux BSP doesn\'t generate the device drivers for some
> of your devices in the base system, it means that device is not
> supported under Linux. To conclude, you need to write a custom AC97
> adapter in order to make it work in Linux.
>
> -Jamie
>
>
> ----- Original Message -----
> From: "Prakash N" <nprakash at cedt.iisc.ernet.in>
> To: "Jamie Lin" <jamiehl at mail.wsu.edu>
> Sent: Sunday, April 30, 2006 11:58 PM
> Subject: RE: XILINX board-Audio Codec-Linux driver support
>
>
> >  Jamie,
> > Iam confused with bsp folders. I just updated EDK with this,
> > http://www.xilinx.com/univ/XUPV2P/lib/lib_rev_1_1.zip
> > In that I could see EDK\\sw\\XilinxProcessorIPLib\\drivers\\ac97_v2_00_a
> > having data and src dirs which contains,
> > Data --> ac97_v2_1_0.tcl, ac97_v2_1_0.mdd
> > Src --> xac97_l.h ,xac97_l.c , Makefile
> > Is it not possible to use these drivers, by copying and pasting in
> > EDK\\sw\\ThirdParty\\bsp\\linux_mvl31_v1_01_a\\drivers
",1] );  //--> > making device drivers to adapt their platforms. The Makefiles can  only
> be used to make Xilinx drivers. All drivers in EDK only work  under
> specific Xilinx platforms. That's why when we want to  run Ethernet  in
> Linux, we need to copy BSP to Linux, so that it knows a specific  type
> of Ethernet needs to be made. We only replace files that comes  with
> BSP in Linux. The rest of driver files in Linux are used to adapt  the
> device. If mv_linux BSP doesn't generate the device drivers for  some
> of your devices in the base system, it means that device is  not
> supported under Linux. To conclude, you need to write a custom  AC97
> adapter in order to make it work in Linux.
>
>  -Jamie
>
>
> ----- Original Message -----
> From:  "Prakash N" <nprakash at cedt.iisc.ernet.in>
>  To: "Jamie Lin" <jamiehl at mail.wsu.edu>
> Sent:  Sunday, April 30, 2006 11:58 PM
>  Subject: RE: XILINX board-Audio  Codec-Linux driver support
>
>
> > Jamie,
> > Iam  confused with bsp folders. I just updated EDK with this,
> > http://www.xilinx.com/univ/XUPV2P/lib/lib_rev_1_1.zip
>  > In that I could see  EDK\sw\XilinxProcessorIPLib\drivers\ac97_v2_00_a
> > having data  and src dirs which contains,
> > Data --> ac97_v2_1_0.tcl,  ac97_v2_1_0.mdd
> > Src --> xac97_l.h ,xac97_l.c , Makefile
>  > Is it not possible to use these drivers, by copying and pasting in
>  > EDK\sw\ThirdParty\bsp\linux_mvl31_v1_01_a\drivers
 > > Please clarify,
> > Prakash
> >
> >
> > -----Original Message-----
>  > From: Jamie Lin [mailto:jamiehl at mail.wsu.edu]
> > Sent: Monday, May 01, 2006 9:49 AM
> > To: Prakash N
> > Subject: Re: XILINX board-Audio Codec-Linux driver support
> >
> >
> > Prakash,
> >
> > The BSP only offers a limit number of necessary drivers. You\'ll have
> > to write custom drivers on your own if they\'re not included. One thing
>
> > you can do is to use the sample IO driver I\'ve written to replace
> > low
> > level IOs in the Xilinx AC97 codec driver. This will take you some
> > time, but is a way to adapt AC97 codec in Linux that I can think of.
> > Other than this approach, I haven\'t seen any ready to use driver for
> > this codec.
> >
> > -Jamie
> >
> >
> > ----- Original Message -----
> > From: <nprakash at cedt.iisc.ernet.in>
> > To: <jamiehl at mail.wsu.edu>
> > Sent: Friday, April 28, 2006 5:23 AM
> > Subject: XILINX board-Audio Codec-Linux driver support
> >
> >
> > > Jamie Lin,
> > > I could follow your doc and successfully ported the Linux in the
> > > board. I
> > just
> > > want to know how can I add the audio codec drivers in linux. I
> > > mean,
>
> > > I
> > couldnt
> > > see the Audio Codec in "Connected Peripherals" in Library & OS
",1] );  //--> > > and run libgen .....
> > Please clarify,
> >  Prakash
> >
> >
> > -----Original  Message-----
> > From: Jamie Lin [mailto:jamiehl at mail.wsu.edu]
> > Sent:  Monday, May 01, 2006 9:49 AM
> > To: Prakash N
> > Subject:  Re: XILINX board-Audio Codec-Linux driver support
> >
>  >
> > Prakash,
> >
> > The BSP only offers a limit  number of necessary drivers. You'll have
> > to write custom drivers on  your own if they're not included. One thing
>
> > you can do is  to use the sample IO driver I've written to replace
> > low
>  > level IOs in the Xilinx AC97 codec driver. This will take you some
>  > time, but is a way to adapt AC97 codec in Linux that I can think  of.
>  > Other than this approach, I haven't seen any ready to use  driver for
> > this codec.
> >
> > -Jamie
>  >
> >
> > ----- Original Message -----
> > From:  <nprakash at cedt.iisc.ernet.in>
>  > To: <jamiehl at mail.wsu.edu>
> >  Sent: Friday, April 28, 2006 5:23 AM
> > Subject: XILINX board-Audio  Codec-Linux driver support
> >
> >
> > > Jamie  Lin,
> > > I could follow your doc and successfully ported the Linux  in the
> > > board. I
> > just
> > > want to  know how can I add the audio codec drivers in linux. I
> > >  mean,
>
> > > I
> > couldnt
> > >  see the  Audio Codec in "Connected Peripherals" in Library & OS
 >
> > > see its there
> > with
> > > all version, base address... defined. How can I add this in that
> > > so
> > > that
> > thro\'
> > > libgen I can add drivers for that also.
> > > Regards
> > > Prakash

------------------------------------------------------------------------------------------------------------------------

I feel I\'d given whatever possible details, still If something is
missing, Please ask the same.
Prakash

",1] ); D(["mb","


--
N.Prakash
Bangalore
+919448787632


",0] );  D(["ma",[1,"2 attachments — Scanning for viruses...temp.zip
294K linuxaudio.zip
22K ","10bd14d0c40a4b1e"] ] );  //--> > > > parameters (software platform settings). But in the hardware I  could
>
> > > see its there
> > with
> >  > all version, base address... defined. How can I add this in that
>  > > so
> > > that
> > thro'
> > > libgen  I can add drivers for that also.
> > > Regards
>  > >  Prakash

---------------------------------------------------------------------------------------------------

I  feel I'd given whatever possible details, still If something is
missing,  Please ask the same.
N.Prakash
ME Final Year- Microelectronics
CEDT-IISc
Bangalore
India
 
 				
---------------------------------
  Yahoo! India Answers: Share what you know. Learn something new Click here
 Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060619/9016e34d/attachment.htm 


More information about the Linuxppc-embedded mailing list