Linux Sound subsystem development
 help / color / mirror / Atom feed
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 v7 0/2] ALSA: pcm: reinvent the stream synchronization ID API
Date: Wed, 03 Jul 2024 10:57:12 +0200	[thread overview]
Message-ID: <87v81mzwd3.wl-tiwai@suse.de> (raw)
In-Reply-To: <20240625172836.589380-1-perex@perex.cz>

On Tue, 25 Jun 2024 19:25:45 +0200,
Jaroslav Kysela wrote:
> 
> Until the commit e11f0f90a626 ("ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO
> internal command"), there was a possibility to pass information
> about the synchronized streams to the user space. The mentioned
> commit removed blindly the appropriate code with an irrelevant comment.
>     
> The revert may be appropriate, but since this API was lost for several
> years without any complains, it's time to improve it. The hardware
> parameters may change the used stream clock source (e.g. USB hardware)
> so move this synchronization ID to hw_params as read-only field.
>     
> It seems that pipewire can benefit from this API (disable adaptive
> resampling for perfectly synchronized PCM streams) now.
>     
> Note that the contents of ID is not supposed to be used for direct
> comparison with a specific byte sequence. The "empty" case is when
> all bytes are zero (driver does not offer this information)
> and all other cases must be only used for equal comparison among
> PCM streams (including different sound cards) if they are using
> identical hardware clock.
>     
> Cc: Takashi Sakamoto <takaswie@kernel.org>
> 
> v6->v7:
>   - rename sync_flag to std_sync_id per Takashi's request
> 
> v5->v6:
>   - remove wrong line from comment (suggested by Amadeusz)
> 
> v4->v5:
>   - extend commit message (clarification for ID use) for first patch
>   - mark union snd_pcm_sync_id as deprecated
>   - do not use get_unaligned() - reviewers are confused and the code
>     is removed in the second path (optimization)
> 
> v3->v4:
>   - more code shuffle as suggested by Takashi
>   - remove unused snd_pcm_empty function in the second patch
>   - put back snd_pcm_set_sync documentation
> 
> v2->v3:
>   - fix pcm_sync_empty() function (wrong comparison) [thanks Takashi Sakamoto]
>   - more documentation for snd_pcm_set_sync_per_card (ID composition)
> 
> v1->v2:
>   - remove union usage per Takashi's request
>   - reduce memory usage
>   - use standard ID generation scheme
> 
> Jaroslav Kysela (2):
>   ALSA: pcm: reinvent the stream synchronization ID API
>   ALSA: pcm: optimize and clarify stream synchronization ID API

I merged both patches now to for-next branch.


Thanks!

Takashi

      parent reply	other threads:[~2024-07-03  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 17:25 [PATCH v7 0/2] ALSA: pcm: reinvent the stream synchronization ID API Jaroslav Kysela
2024-06-25 17:25 ` [PATCH v7 1/2] " Jaroslav Kysela
2024-06-25 17:25 ` [PATCH v7 2/2] ALSA: pcm: optimize and clarify " Jaroslav Kysela
2024-07-03  8:57 ` Takashi Iwai [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=87v81mzwd3.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox