All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Patrick Welche <prlw1@cam.ac.uk>
Cc: alsa-devel@alsa-project.org
Subject: Re: alsa on non-linux
Date: Tue, 14 Jan 2014 14:23:01 +0100	[thread overview]
Message-ID: <s5hsisqsnnu.wl%tiwai@suse.de> (raw)
In-Reply-To: <20140114101709.GB160@quark.internal.precedence.co.uk>

At Tue, 14 Jan 2014 10:17:09 +0000,
Patrick Welche wrote:
> 
> On Mon, Jan 13, 2014 at 01:13:23PM +0100, Takashi Iwai wrote:
> > At Fri, 10 Jan 2014 15:37:00 +0000,
> > Patrick Welche wrote:
> > > 
> > > I am currently successfully running alsa-lib 1.0.22 with oss plugins on
> > > a non-linux box. The advantage is that programs written to use libasound
> > > work.
> > > 
> > > I just tried to update alsa-lib, and see that now alsa-lib directly
> > > includes headers like linux/types.h, and all protection, such as
> > > 
> > >   #if defined(LINUX) || defined(__LINUX__) || defined(__linux__)
> > > 
> > > has been removed. This means that compilation on non-linux is
> > > essentially impossible.
> > > 
> > > Is it that there is now a different way of obtaining that alsa lib
> > > front end / oss back end layer?
> > 
> > Feel free to submit a fix patch :)
> > 
> > The inclusions of linux/*.h are mostly due to laziness.  If a patch is
> > confirmed to work on both Linux glibc and others, we'll happily take
> > that patch.
> 
> I started out, writing the attached patch in November, but then it looked
> as though the boundaries of application library interface and linux sound
> chip driver had become so blurred that I thought that a decision had been
> taken to bin all OSes bar linux, hence the question. Can you give me a
> hint on how you think it is supposed to work? (Which bits you know are
> meant to be linux only, as they are the actual drivers, which bits you think
> should be OS agnositic...)

The Linux-specific part is only the type definitions.  There are a few
Linux-kernel specific types and modifiers like __kernel_off_t or
__bitwise, which are provided in linux/types.h.  This is the only
reason of linux/types.h inclusion.  The inclusion of linux/ioct.h. can
be well replaced with sys/ioctl.h, I guess.

BTW, about your patch: I don't think it's good to embed the endianness
in asoundlib.h.  It makes the header file appearing differently,
depending on the architecture, which is rather confusing.


Takashi

  reply	other threads:[~2014-01-14 13:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10 15:37 alsa on non-linux Patrick Welche
2014-01-13 12:13 ` Takashi Iwai
2014-01-14 10:17   ` Patrick Welche
2014-01-14 13:23     ` Takashi Iwai [this message]
2014-02-21  1:27       ` Patrick Welche
2014-02-21 11:04         ` Takashi Iwai
2014-02-23 11:12           ` Patrick Welche
2014-02-24 10:03             ` Takashi Iwai
2014-02-25 12:40               ` Patrick Welche
2014-02-26  7:17                 ` Takashi Iwai
2014-01-14 14:04     ` Clemens Ladisch
2014-01-16 13:27       ` Patrick Welche
2014-01-16 13:46         ` Takashi Iwai
2014-02-25 12:45           ` Patrick Welche
2014-02-26  7:20             ` Takashi Iwai

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=s5hsisqsnnu.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=prlw1@cam.ac.uk \
    /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.