[PATCH v2 3/5] replace sink/source SET_STATE handlers with callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

13.03.2018 20:40, Tanu Kaskinen пиÑ?еÑ?:
> diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
...
> +/* Called from the IO thread. */
> +static int sink_set_state_in_io_thread_cb(pa_sink *s, pa_sink_state_t new_state) {
...
> +    switch (new_state) {
> +
> +        case PA_SINK_SUSPENDED: {
> +            pa_assert(PA_SINK_IS_OPENED(u->sink->thread_info.state));
...
> diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
...
> +/* Called from the IO thread. */
> +static int source_set_state_in_io_thread_cb(pa_source *s, pa_source_state_t new_state) {
...
> +    switch (new_state) {
> +
> +        case PA_SOURCE_SUSPENDED: {
> +            pa_assert(PA_SOURCE_IS_OPENED(u->source->thread_info.state));
...
> diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
...
> +        case PA_SINK_SUSPENDED:
> +            /* Ignore if transition is PA_SINK_INIT->PA_SINK_SUSPENDED */
> +            if (!PA_SINK_IS_OPENED(u->sink->thread_info.state))
> +                break;
...
> +        case PA_SOURCE_SUSPENDED:
> +            /* Ignore if transition is PA_SOURCE_INIT->PA_SOURCE_SUSPENDED */
> +            if (!PA_SOURCE_IS_OPENED(u->source->thread_info.state))
> +                break;

I know this is only code movement from SET_STATE handler to callbacks.
But looking in alsa sink/source these transitions are impossible:
PA_SINK_INIT->PA_SINK_SUSPENDED
PA_SOURCE_INIT->PA_SOURCE_SUSPENDED

--
Raman


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux