All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC - Clean up of ALSA kernel codes
@ 2005-10-06 12:29 Takashi Iwai
  2005-10-07 14:31 ` Martin Habets
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2005-10-06 12:29 UTC (permalink / raw)
  To: alsa-devel

Hi,

currently I'm working on clean up of ALSA kernel side codes.
There have been complaints from kernel developers about the ALSA's
own-styles, and I'm trying to reduce them.

My plan is like below:

1. Clean up of kmalloc/vmalloc wrappers

1a. Removal of vmalloc wrapper

   The vmalloc wrapper breaks the alignment of page size, which has
   many side effects.  So let's remove this.

1b. Move kmalloc wrapper to alsa-driver tree

   Remove kmalloc wrapper from alsa-kernel tree, but put it to
   alsa-driver tree, so that we can still check the memory leak with
   own build.

   *_nocheck() should be removed from alsa-kernel.  Since most of 
   kfree_nocheck() is bound with release_resource(), I'll introduce
   release_and_free_resource() funciton to simplify.

2. Removal of snd_runtime_check()

   snd_runtime_check() worsens the flow visibility.
   It should be either a check-only like snd_assert(), or a simple
   if condition with snd_BUG().

3. Removal of snd_timestamp_*

   Use normal functions like getnstimeofday().

4. Removal of the main memory allocators

   Introduce alloc_buffer() and free_buffer() callbacks, and let each
   driver to allocate buffers using dma_alloc_coherent(), etc.
   This will reduce snd_alloc_*() allocators in memalloc.c.

5. Reprogram SG-buffer handlers

   Use dma_map_sg() for sg-buffers, so that the non-consistent
   allocator can be used, e.g. vmalloc_32().
   For devices with DMA mask less than 32bit (e.g. trident, emu10k1),
   a new function may be required to allocate pages in the given DMA
   mask.

6. Use dma_mmap_coherent() on all architectures

   Once after dma_mmap_coherent() is implemented on all architectures,
   we can get rid of nopage stuff.  It's more straightforward.
   (This requires the handling of reserved pages, so wait until the
   remove-page-reserve patch is accepted.)


I already have done up to 3 on my local tree, and ready to commit.
4, 5 and 6 are work in progress.


As additional items:

7. Removal of xxx_t styles (use struct xxx, instead)
8. Clean up proc fs handlers

They are in lower priorities, so will do if I have enough time left.


If you have any objections, comments or suggestions, please let me
know.  I'd like to start committing from tomorrow or next week.


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RFC - Clean up of ALSA kernel codes
@ 2005-10-06 20:51 Tom Watson
  2005-10-07  7:16 ` Jaroslav Kysela
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Watson @ 2005-10-06 20:51 UTC (permalink / raw)
  To: alsa-devel

In your message you mentioned:
"8. Clean up proc fs handlers".

My only idea is to make the /proc stuff a little more "page friendly".  Many
of the register dumps are one register per line.  It is a bit easier (in my
opinion) to have them say 8 register values per line.  It makes the things
easier to read, and refer without scrolling back and forth.  As an example
(not limited to JUST this sound card): /proc/asound/V8235/via82xx produces
over 40 lines of register data.  It could have just as easily been formatted
horizontally and be at a minimum 1/4 of the number of lines.

Yes, this is a picky item, but having register data in a nice readable format
makes for nicer debugging.  Obviously this is not a "high priority" item, as
the current setup does function.  I will leave it to others to determine the
priority of such a change.

I do have a driver in the planning stages, and my intent is to make the /proc
printouts "nicely formatted".  We shall see when I publish the driver which
is one of those "real soon now" (in the works for 2+ years) things.

Just random thoughts.

-- 
Tom Watson
tsw@johana.com


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-10-07 14:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-06 12:29 RFC - Clean up of ALSA kernel codes Takashi Iwai
2005-10-07 14:31 ` Martin Habets
2005-10-07 14:50   ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2005-10-06 20:51 Tom Watson
2005-10-07  7:16 ` Jaroslav Kysela
2005-10-07 10:05   ` Takashi Iwai

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.