linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Takashi Iwai <tiwai@suse.de>,
	ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [alsa-devel] [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers
Date: Mon, 22 Jul 2019 15:34:04 +0200	[thread overview]
Message-ID: <CAK8P3a2tLuqu+upt0nW8dUzXc+t_kEJwVhLcqY8TXydHLb_nCw@mail.gmail.com> (raw)
In-Reply-To: <ec306745-052d-f52c-2cce-d8915822d4ff@linux.intel.com>

On Mon, Jul 22, 2019 at 3:16 PM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
> On 7/22/19 7:56 AM, Takashi Iwai wrote:
> > On Mon, 22 Jul 2019 14:49:34 +0200,
> > Pierre-Louis Bossart wrote:
> >>
> >>
> >>
> >> On 7/21/19 9:23 AM, Masahiro Yamada wrote:
> >>> When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to
> >>> make sure they can be included from user-space.
> >>>
> >>> Currently, header.h and fw.h are excluded from the test coverage.
> >>> To make them join the compile-test, we need to fix the build errors
> >>> attached below.
> >>>
> >>> For a case like this, we decided to use __u{8,16,32,64} variable types
> >>> in this discussion:
> >>>
> >>>     https://lkml.org/lkml/2019/6/5/18
> >>
> >> these files are shared with the SOF project and used as is (with minor
> >> formatting) for the firmware compilation. I am not sure I understand
> >> the ask here, are you really asking SOF to use linux-specific type
> >> definitions?
> >
> > Actually this is linux-kernel UAPI header files, so yes, we should
> > follow the convention there as much as possible.
> >
> > So far we haven't been strict about these types.  But now we have a
> > unit test for checking it, so it's a good opportunity to address the
> > issues.
>
> Maybe a bit of background. For SOF we split the includes in 4 directories
>
> https://github.com/thesofproject/sof/tree/master/src/include
>
> - sof: internal includes for firmware only
> - ipc: definitions of the structures for information exchanged over the
> IPC channel. This directory is used as is by the Linux kernel and
> mirrored in include/sound/sof
> - user: definitions needed for firmware tools, e.g. to generate the
> image or parse the trace. this directory is not used by the Linux kernel.
> - kernel: definitions for the firmware format, needed for the loader to
> parse the firmware files. This is not directly used by applications
> running on the target, it really defines the content passed to the
> kernel with request_firmware. This directory is mirrored in the Linux
> include/uapi/sound/sof directory.
>
> Our goal is to minimize the differences and allow deltas e.g. for
> license or comments. We could add a definition for __u32 when linux is
> not used, I am just not sure if these two files really fall in the UAPI
> category and if the checks make sense.

If you can build all the SOF user space without these headers being
installed to /usr/include/sound/sof/, you can move them from
include/uapi/sound/sof to include/sounds/sof and leave the types
unchanged.

         Arnd

  reply	other threads:[~2019-07-22 13:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-21 14:23 [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers Masahiro Yamada
2019-07-22 12:22 ` Applied "ASoC: SOF: use __u32 instead of uint32_t in uapi headers" to the asoc tree Mark Brown
2019-07-22 12:49 ` [alsa-devel] [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers Pierre-Louis Bossart
2019-07-22 12:56   ` Takashi Iwai
2019-07-22 13:16     ` Pierre-Louis Bossart
2019-07-22 13:34       ` Arnd Bergmann [this message]
2019-07-22 15:18         ` Pierre-Louis Bossart
2019-07-22 15:21           ` Arnd Bergmann
2019-07-22 13:39 ` Arnd Bergmann
2019-07-22 14:35   ` Masahiro Yamada
2019-07-22 15:19   ` [alsa-devel] " Pierre-Louis Bossart

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=CAK8P3a2tLuqu+upt0nW8dUzXc+t_kEJwVhLcqY8TXydHLb_nCw@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    --cc=yamada.masahiro@socionext.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).