From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: <linux-sound@vger.kernel.org>, Takashi Iwai <tiwai@suse.de>,
Takashi Sakamoto <takaswie@kernel.org>
Subject: Re: [PATCH v3 1/2] ALSA: pcm: reinvent the stream synchronization ID API
Date: Tue, 07 May 2024 14:33:07 +0200 [thread overview]
Message-ID: <87msp1er98.wl-tiwai@suse.de> (raw)
In-Reply-To: <20240507083142.557299-2-perex@perex.cz>
On Tue, 07 May 2024 10:26:18 +0200,
Jaroslav Kysela wrote:
> +/**
> + * is sync id (clock id) empty?
> + */
> +static inline bool pcm_sync_empty(const unsigned char *sync)
> +{
> + return get_unaligned((__u64 *)(sync + 0)) == 0 && get_unaligned((__u64 *)(sync + 8)) == 0;
> +}
This helper is needed only in one place, so we don't have to put in
the common header. Let's move to a local place (together with
unaligned.h inclusion).
> @@ -1810,6 +1808,16 @@ static int snd_pcm_lib_ioctl_fifo_size(struct snd_pcm_substream *substream,
> return 0;
> }
>
> +static int snd_pcm_lib_ioctl_sync_id(struct snd_pcm_substream *substream,
> + void *arg)
> +{
> + struct snd_pcm_hw_params *params = arg;
> +
> + if (pcm_sync_empty(params->sync))
> + memcpy(params->sync, &substream->runtime->sync, sizeof(params->sync));
Since sync is an array now, shouldn't we drop '&' here?
thanks,
Takashi
next prev parent reply other threads:[~2024-05-07 12:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-07 8:26 [PATCH v3 0/2] ALSA: pcm: reinvent the stream synchronization ID API Jaroslav Kysela
2024-05-07 8:26 ` [PATCH v3 1/2] " Jaroslav Kysela
2024-05-07 12:33 ` Takashi Iwai [this message]
2024-05-07 8:26 ` [PATCH v3 2/2] ALSA: pcm: optimize and clarify stream sychronization " Jaroslav Kysela
2024-05-07 12:38 ` Takashi Iwai
2024-05-07 12:40 ` [PATCH v3 0/2] ALSA: pcm: reinvent the stream synchronization " 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=87msp1er98.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=takaswie@kernel.org \
/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.