]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: iec958: Split status creation and fill
authorMaxime Ripard <maxime@cerno.tech>
Tue, 25 May 2021 13:23:44 +0000 (15:23 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 8 Jun 2021 15:05:41 +0000 (17:05 +0200)
commit7b373febb587ceea65edf8cfb16434907bdc4b25
tree697a95e9e49641f6272a71cda90097ba1378acf2
parent31e1fee2525a5045fcd2c438d9385e7a0d9032d6
ALSA: iec958: Split status creation and fill

In some situations, like a codec probe, we need to provide an IEC status
default but don't have access to the sampling rate and width yet since
no stream has been configured yet.

Each and every driver has its own default, whereas the core iec958 code
also has some buried in the snd_pcm_create_iec958_consumer functions.

Let's split these functions in two to provide a default that doesn't
rely on the sampling rate and width, and another function to fill them
when available.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210525132354.297468-3-maxime@cerno.tech
include/sound/pcm_iec958.h
sound/core/pcm_iec958.c