пт, 3 мая 2019 г. в 11:57, Georg Chini <georg@xxxxxxxx>: > The channel layout of input/output > and the playback device is known to module-plugin-sink, so if > a filter needs it, it can be passed as parameter. No need to > have it in the interface. (I have also received your next email, ACK on the thought that the channel maps don't change on the fly). Having it (also with other properties like sink or port name) as a parameter is indeed a neat idea that solves a lot of problems. However, we should still think about the boolean bypass parameter, how it is supposed to work. Is my understanding below correct? 1. The virtual surround filter gets created by PulseAudio for 6 input and 2 output channels and gets the input channel layout (5.1), output channel layout (stereo), and playback sink and port as parameters. 2. Some audio plays through it. 3. The user unplugs headphones, so that the output now goes through stereo speakers 4. Before sending the next chunk of audio, PulseAudio updates the filter parameters related to the sink port (a), and/or calls the set_port callback function (b). 5a. The filter notices the parameter change, processes the audio anyway, and sets the self-disable parameter to true. 6a. PulseAudio reads the audio and the self-disable parameter, throws away the processed audio and downmixes 5.1 to stereo by itself. 5b. set_port says "no" or updates the self-disable parameter, PulseAudio notices and downmixes 5.1 to stereo by itself. It would also be interesting to see what happens if unplugging the headphones causes the number of channels (of the channel layout in general) to change. Note that I don't have such setup, not even sure how it is handled currently. -- Alexander E. Patrakov _______________________________________________ pulseaudio-discuss mailing list pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss