All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Takashi Iwai <tiwai@suse.de>
Cc: ffado-devel@lists.sourceforge.net, alsa-devel@alsa-project.org,
	clemens@ladisch.de
Subject: Re: [PATCH 00/11] ALSA: firewire-motu: add ioctl commands to retrieve information in messages delivered by isoc packet
Date: Wed, 20 Oct 2021 16:14:16 +0900	[thread overview]
Message-ID: <YW/ByPmBY7WSHmWI@workstation> (raw)
In-Reply-To: <s5hzgr64hja.wl-tiwai@suse.de>

Hi,

On Mon, Oct 18, 2021 at 02:57:29PM +0200, Takashi Iwai wrote:
> On Mon, 18 Oct 2021 14:46:54 +0200,
> Takashi Sakamoto wrote:
> > 
> > Hi,
> > 
> > On Mon, Oct 18, 2021 at 10:05:32AM +0200, Takashi Iwai wrote:
> > > On Sun, 17 Oct 2021 11:25:37 +0200,
> > > Takashi Sakamoto wrote:
> > > > 
> > > > Would I ask you opinion about my concern about firewire UAPI header? Is
> > > > it allowed to use float type instead of __u32 type?
> > > 
> > > I guess the safest way would be like include/uapi/linux/acct.h.
> > > The ifdef KERNEL will be omitted at installation, so user-space would
> > > see only float type while the kernel sees only __u32.
> > 
> > Yes. I've already found the header and it would be the safest, However,
> > conditional macro sometimes confuses userspace developers...
> 
> I believe that the ifdef will be dropped automagically during
> installing the files, so that user-space will see only float.
> 
> You can try to patch and run make headers_install.

Oh, I thought that the headers are simply copied when installing...
Indeed, I can find 'scripts/headers_install.sh' does the work in
'headers' make target invoked by the 'headers_install' target.

```
$ tail -n10 include/uapi/sound/firewire.h 
 */
struct snd_firewire_motu_command_dsp_meter {
#ifdef __KERNEL__
	__u32 data[SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT];
#else
	float data[SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT];
#endif
};

#endif /* _UAPI_SOUND_FIREWIRE_H_INCLUDED */
$ make headers
$ tail -n5 usr/include/sound/firewire.h 
 */
struct snd_firewire_motu_command_dsp_meter {
	float data[SNDRV_FIREWIRE_MOTU_COMMAND_DSP_METER_COUNT];
};

#endif /* _SOUND_FIREWIRE_H_INCLUDED */
```

It would be achieved to use different type with the same storage size
between kernel and userspace. After writing some userspace test
applications, I'll post the patch. Thanks for your advice.

> Takashi


Regards

Takashi Sakamoto

      reply	other threads:[~2021-10-20  7:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15  8:08 [PATCH 00/11] ALSA: firewire-motu: add ioctl commands to retrieve information in messages delivered by isoc packet Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 01/11] ALSA: firewire-motu: add message parser to gather meter information in register DSP model Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 02/11] ALSA: firewire-motu: add message parser for meter information in command " Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 03/11] ALSA: firewire-motu: add ioctl command to read cached hardware meter Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 04/11] ALSA: firewire-motu: parse messages for mixer source parameters in register-DSP model Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 05/11] ALSA: firewire-motu: parse messages for mixer output parameters in register DSP model Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 06/11] ALSA: firewire-motu: parse messages for " Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 07/11] ALSA: firewire-motu: parse messages for line input " Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 08/11] ALSA: firewire-motu: parse messages for " Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 09/11] ALSA: firewire-motu: add ioctl command to read cached " Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 10/11] ALSA: firewire-motu: queue event for parameter change " Takashi Sakamoto
2021-10-15  8:08 ` [PATCH 11/11] ALSA: firewire-motu: notify " Takashi Sakamoto
2021-10-15 15:54 ` [PATCH 00/11] ALSA: firewire-motu: add ioctl commands to retrieve information in messages delivered by isoc packet Takashi Iwai
2021-10-17  1:22   ` Takashi Sakamoto
2021-10-17  7:02     ` Takashi Iwai
2021-10-17  9:25       ` Takashi Sakamoto
2021-10-18  8:05         ` Takashi Iwai
2021-10-18 12:46           ` Takashi Sakamoto
2021-10-18 12:57             ` Takashi Iwai
2021-10-20  7:14               ` Takashi Sakamoto [this message]

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=YW/ByPmBY7WSHmWI@workstation \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=ffado-devel@lists.sourceforge.net \
    --cc=tiwai@suse.de \
    /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.