[alsa-devel] Propagating audio properties along the audio path

Pavel Hofman pavhofman at gmail.com
Tue Sep 24 17:33:15 CEST 2019


On Tue, Sep 24, 2019 at 4:44 PM Charles Keepax <
ckeepax at opensource.cirrus.com> wrote:

> > "at one point we were just closing the stream (somehow) if we detected
> > a change in e.g. sample-rate, so the user-space application would fail
> > on snd_pcm_readi()"
> >
> >       snd_pcm_stop(p_spdif->capture_stream,
> SNDRV_PCM_STATE_DISCONNECTED);
> >
>
> Ah ok yeah that seems like a pretty good option to me thus
> forcing user-space to re-open at the new params.
>
>
E.g. SPDIF receivers do that when sample rate change is detected in a
separate timer thread

https://github.com/torvalds/linux/blob/master/sound/i2c/other/ak4114.c#L588


More information about the Alsa-devel mailing list