Loading the OSS modules on the XO

pgf at laptop.org pgf at laptop.org
Wed Aug 13 14:21:50 EDT 2008


noah wrote:
 > Why don't you fix the application instead of working around stupid
 > deprecated nonsense? That seems like a better use of everyone's time.

gee, that seems a little harsh.  :-)

i think the original poster made it clear that they're relatively
new to linux/unix programming, and are simply trying to get an
application (which was written to a prior, but still-supported,
kernel standard for audio) to work on the XO.  i'm not sure why
we would discourage someone from experimenting.  devel@ isn't
normally a user-support forum, but the original question was
pretty well focused.

paul

 > 
 > --Noah
 > 
 > > -----Original Message-----
 > > From: devel-bounces at lists.laptop.org [mailto:devel-
 > > bounces at lists.laptop.org] On Behalf Of victor
 > > Sent: Wednesday, August 13, 2008 8:18 AM
 > > To: devel at lists.laptop.org
 > > Subject: Re: Loading the OSS modules on the XO
 > > 
 > > Just tested here
 > > 
 > > $ modprobe snd-pcm-oss
 > > $ cat /dev/dsp > /dev/dsp
 > > 
 > > and I get lovely mic-speaker parrot feedback.
 > > I guess it's just about adding this modprobe line to the init scripts
 > > 
 > > VL
 > > ----- Original Message -----
 > > From: "Jim Gettys" <jg at laptop.org>
 > > To: <pgf at laptop.org>; "Deepak Saxena" <dsaxena at mvista.com>
 > > Cc: <devel at lists.laptop.org>
 > > Sent: Wednesday, August 13, 2008 3:58 PM
 > > Subject: Re: Loading the OSS modules on the XO
 > > 
 > > 
 > > >I thought there was a library/shim/kernel option that allowed us to
 > > > emulate OSS on ALSA?
 > > >
 > > > In any case, anything not using ALSA at this date really should get
 > > > updated to ALSA....
 > > >                         - Jim
 > > >
 > > >
 > > >
 > > > On Wed, 2008-08-13 at 10:43 -0400, pgf at laptop.org wrote:
 > > >> shivaprasad wrote:
 > > >>  > Its OK if I need to have root permissions only once right? I can
 > > >> change the
 > > >>
 > > >> yes.
 > > >>
 > > >>  > /etc/modules/ once during installation of the activity and need
 > > not
 > > >> load the
 > > >>  > module every time I run the activity. I am new programming on
 > > Linux
 > > >> and
 > > >>  > wasnt sure what to change to make the XO load the oss module on
 > > >> startup. So
 > > >>  > my plan is if I  know how to make the XO load the  oss modules  I
 > > can
 > > >> do
 > > >>  > this in a script and run the script during installation of the
 > > >> activity so
 > > >>  > that when I launch the activity I would not need root
 > > permission.Could
 > > >> you
 > > >>  > please tell me how to change /etc/modules to load oss modules on
 > > >> startup?
 > > >>
 > > >> the file /etc/modules that erik mentioned isn't used on the XO, but
 > > >> there's a similar mechanism in place.
 > > >>
 > > >> create a new file /etc/sysconfig/modules, with a name that ends
 > > >> in ".modules", like "oss.modules".  that file should be an
 > > executable
 > > >> shell script which will load the modules you want.  see the existing
 > > >> "olpc-1.modules" file in that directory as an example, but probably
 > > >> all you need is a single "modprobe snd-pcm-oss" command.
 > > >>
 > > >> this should cause your module to be installed when the XO boots.
 > > >>
 > > >> paul
 > > >>
 > > >>  >
 > > >>  > Thanks
 > > >>  > Shivaprasad
 > > >>  >
 > > >>  > On Wed, Aug 13, 2008 at 6:54 PM, Erik Garrison <erik at laptop.org>
 > > >> wrote:
 > > >>  >
 > > >>  > > On Wed, Aug 13, 2008 at 06:16:58PM +0530, shivaprasad javali
 > > wrote:
 > > >>  > > > Hi,
 > > >>  > > >
 > > >>  > > >    I am porting a application to the XO. It uses the OSS
 > > sound
 > > >> Api's to
 > > >>  > > > render sound. I found that the oss modules are not loaded on
 > > the
 > > >> xo by
 > > >>  > > > default. I was able to load the oss modules by running
 > > modprobe
 > > >>  > > snd-pcm-oss
 > > >>  > > > which created the /dev/dsp and other device files required by
 > > the
 > > >> oss
 > > >>  > > > modules and was able to run my application on the XO. But the
 > > >> problem is
 > > >>  > > > every time I reboot the XO I will have to run the commands
 > > and
 > > >> load the
 > > >>  > > oss
 > > >>  > > > modules.
 > > >>  > > >
 > > >>  > > >    Is there any way I can tell the XO to always load the oss
 > > >> modules?
 > > >>  > > Even
 > > >>  > > > if I have a script to run the commands on launching the
 > > >> application these
 > > >>  > > > commands would require super user privileges which I wont
 > > have
 > > >> when I
 > > >>  > > launch
 > > >>  > > > the application from the activity bar. Any Ideas?
 > > >>  > >
 > > >>  > > Without root access, your activity will have difficulty
 > > modifying
 > > >>  > > /etc/modules to enable autoloading the snd-pcm-oss module at
 > > boot.
 > > >> I am
 > > >>  > > unsure if there is any way around this issue unless the
 > > deployment
 > > >> scope
 > > >>  > > for your activity is a set of machines on which you have root
 > > >> access.
 > > >>  > >
 > > >>  > > Erik
 > > >>  > >

=---------------------
 paul fox, pgf at laptop.org



More information about the Devel mailing list