All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaroslav Kysela <perex@perex.cz>
To: Takashi Iwai <tiwai@suse.de>
Cc: linux-sound@vger.kernel.org, Takashi Sakamoto <takaswie@kernel.org>
Subject: Re: [PATCH] ALSA: pcm: reinvent the stream synchronization ID API
Date: Thu, 2 May 2024 19:05:52 +0200	[thread overview]
Message-ID: <7994deb1-d215-4e66-9d46-2e92f712a76e@perex.cz> (raw)
In-Reply-To: <87o79oi68y.wl-tiwai@suse.de>

On 02. 05. 24 17:27, Takashi Iwai wrote:

>>>> --- a/include/uapi/sound/asound.h
>>>> +++ b/include/uapi/sound/asound.h
>>> (snip)
>>>> @@ -334,6 +334,7 @@ union snd_pcm_sync_id {
>>>>    	unsigned char id[16];
>>>>    	unsigned short id16[8];
>>>>    	unsigned int id32[4];
>>>> +	__u64 id64[2];
>>>>    };
>>>
>>> What's the reason for this __u64 addition?  For the easiness of
>>> zero-compare?
>>
>> Basically yes, but this extensions is aligned with other fields. Also,
>> I think that it may be usable to work with 64-bit words here. Perhaps,
>> other fields may use __uXX declarations, too.
> 
> IMO, if we are allowed to redesign, it'd be better to avoid a union
> for an API call.  It's a nightmare if one needs a conversion of API
> (e.g. between different endianess for emulator).

It makes sense. I'll keep only unsigned char id then.

					Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


  reply	other threads:[~2024-05-02 17:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 16:10 [PATCH] ALSA: pcm: reinvent the stream synchronization ID API Jaroslav Kysela
2024-05-01 11:44 ` Takashi Sakamoto
2024-05-01 14:17   ` Jaroslav Kysela
2024-05-02  7:31 ` Takashi Iwai
2024-05-02  8:02   ` Jaroslav Kysela
2024-05-02 15:27     ` Takashi Iwai
2024-05-02 17:05       ` Jaroslav Kysela [this message]
2024-05-06  9:02 ` Amadeusz Sławiński
2024-05-06  9:12   ` Jaroslav Kysela

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=7994deb1-d215-4e66-9d46-2e92f712a76e@perex.cz \
    --to=perex@perex.cz \
    --cc=linux-sound@vger.kernel.org \
    --cc=takaswie@kernel.org \
    --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.