All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Stephen Warren <SWarren@nvidia.com>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Merging alsa-kernel-1.0.7 into kernel 2.6.9
Date: Fri, 19 Nov 2004 19:33:21 +0100	[thread overview]
Message-ID: <s5hoeht3czy.wl@alsa2.suse.de> (raw)
In-Reply-To: <DBFABB80F7FD3143A911F9E6CFD477B002A7F808@hqemmail02.nvidia.com>

At Thu, 18 Nov 2004 20:41:13 -0800,
Stephen Warren wrote:
> 
> I'm working on a project where we don't use modules for the kernel at
> all - for various reasons such as target environment simplicity - very
> hard-coded boot scripts, no huge sysvinit based interactive 'desktop'
> system etc.
> 
> We need ALSA support, and specifically, alsa-driver 1.0.7 release fixes
> some problems for the target hardware we're using.
> 
> So, I'm attempting to merge the content of alsa-driver 1.0.7 into the
> kernel source tree, and to build ALSA support as non-modules.
> 
> I found a few resources that *basically* say you just copy the
> alsa-kernel directory into the kernel tree and that's it. So, here's
> what I started doing:
> 
> # linux-kernel.org is a virgin kernel.org 2.6.9 tree
> rm -rf linux-kernel.org-2
> cp -rp linux-kernel.org linux-kernel.org-2
> chmod -R +w linux-kernel.org-2
> rm -rf alsa-driver-1.0.7
> tar jxvf patches-src/alsa-driver-1.0.7.tar.bz2
> cd alsa-driver-1.0.7/alsa-kernel/
> rm -rf oss
> cp -a * ../../linux-kernel.org-2/sound
> rm -rf ../../linux-kernel.org-2/sound/include
> rm -rf ../../linux-kernel.org-2/sound/Documentation
> cd include
> cp -a * ../../../linux-kernel.org-2/include/sound
> cd ../Documentation
> cp -a * ../../../linux-kernel.org-2/Documentation/sound/alsa
> cd ../../..
> diff -urN linux-kernel.org linux-kernel.org-2 >
> patches-src/nvidia-2.6.9-alsa-1.0.7-1.diff
> 
> This gets me a pretty fair way. I found from that point, that all I
> needed to do was apply acore/init.patch, then manually fix all the calls
> to module_param_array() to take a dummy count argument to back-port the
> code to the 2.6.9 API.
> 
> Having done this, the kernel does compile and I can get sound working.
> However, I'm wondering if this is a totally 100% correct approach. For
> example, if I watch the result of a regular "./configure;make" build of
> alsa-driver, I notice a lot of patches being applied to the source
> before the build, most to enable the code to compile on a wide range of
> kernels. If I manually apply to my tree every *.patch that the regular
> build process applies, then I'm left with a few sets of errors:
> 
> * memalloc failures, due to missing header files (config.h/adriver.h if
> I recall)
> * KERNEL_VERSION isn't define everywhere, due to missing
> <linux/version.h> includes
> * still have the module_param_array problems
> 
> So, should I just ignore all the patches except init.path, do the manual
> fixup of the module_param_array stuff and be done?

Yes.  The only changes are module_param_array() and
pci_save/restore_config() stuff, IIRC.
I don't remember whether usb has a change (which is one of the most
frequently changed thing).

> Any pointers on the 'correct' way to do this would be greatly
> appreciated. If there's an accurate doc somewhere, my googling hasn't
> found it.

The backporting is the only way, I think.
It's a generic problem of kernel drivers, continuously changing API :)


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

  parent reply	other threads:[~2004-11-19 18:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-19  4:41 Merging alsa-kernel-1.0.7 into kernel 2.6.9 Stephen Warren
2004-11-19  4:50 ` Lee Revell
2004-11-19 18:33 ` Takashi Iwai [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-11-19 16:25 Stephen Warren
2004-11-19 18:32 ` Lee Revell
2004-11-19 20:52 Stephen Warren

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=s5hoeht3czy.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=SWarren@nvidia.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.