Pipewireパッケージ(ちょっと変更)
リビジョン | 92330b9de341c3b7bc537d2f42687b65c7ceb527 (tree) |
---|---|
日時 | 2023-11-16 00:35:17 |
作者 | Wim Taymans <wtaymans@redh...> |
コミッター | Wim Taymans |
alsa: the default poll_descriptors is good now
Remove our custom poll_descriptors function because the default is
enough now that we update from revents.
@@ -159,15 +159,6 @@ static int snd_pcm_pipewire_close(snd_pcm_ioplug_t *io) | ||
159 | 159 | return 0; |
160 | 160 | } |
161 | 161 | |
162 | -static int snd_pcm_pipewire_poll_descriptors(snd_pcm_ioplug_t *io, struct pollfd *pfds, unsigned int space) | |
163 | -{ | |
164 | - snd_pcm_pipewire_t *pw = io->private_data; | |
165 | - update_active(io); | |
166 | - pfds->fd = pw->fd; | |
167 | - pfds->events = POLLIN | POLLERR | POLLNVAL; | |
168 | - return 1; | |
169 | -} | |
170 | - | |
171 | 162 | static int snd_pcm_pipewire_poll_revents(snd_pcm_ioplug_t *io, |
172 | 163 | struct pollfd *pfds, unsigned int nfds, |
173 | 164 | unsigned short *revents) |
@@ -179,10 +170,8 @@ static int snd_pcm_pipewire_poll_revents(snd_pcm_ioplug_t *io, | ||
179 | 170 | if (pw->error < 0) |
180 | 171 | return pw->error; |
181 | 172 | |
182 | - update_active(io); | |
183 | - | |
184 | 173 | *revents = pfds[0].revents & ~(POLLIN | POLLOUT); |
185 | - if (pfds[0].revents & POLLIN && pw->active) | |
174 | + if (pfds[0].revents & POLLIN && update_active(io)) | |
186 | 175 | *revents |= (io->stream == SND_PCM_STREAM_PLAYBACK) ? POLLOUT : POLLIN; |
187 | 176 | |
188 | 177 | pw_log_trace_fp("poll %d", *revents); |
@@ -910,7 +899,6 @@ static snd_pcm_ioplug_callback_t pipewire_pcm_callback = { | ||
910 | 899 | .delay = snd_pcm_pipewire_delay, |
911 | 900 | .drain = snd_pcm_pipewire_drain, |
912 | 901 | .prepare = snd_pcm_pipewire_prepare, |
913 | - .poll_descriptors = snd_pcm_pipewire_poll_descriptors, | |
914 | 902 | .poll_revents = snd_pcm_pipewire_poll_revents, |
915 | 903 | .hw_params = snd_pcm_pipewire_hw_params, |
916 | 904 | .sw_params = snd_pcm_pipewire_sw_params, |