On Fri, 2017-04-28 at 12:21 +0800, Hui Wang wrote: > Hello Tanu, > > Could you please take a look at this patch, you are the maintainer and > recently contributed couple of commits to > module-switch-on-port-available.c. :-) Well, I'm trying to concentrate on preparing for the release, so I don't do patch reviews much at the moment. Now that I read the commit message, I have some comments, though. > On 04/27/2017 11:20 AM, Hui Wang wrote: > > Suppose your machine has two sound cards as below: > > > > Card#0(HDA INTEL HDMI)-> Sink#0(hdmi-stereo)->hdmi-output(priority: 5900) > > Card#1(HDA INTEL PCH)->Sink#1(analog-stereo)->headphones(priority: 9000) > > > > If neither hdmi cable nor headphone plug into the machine, the default > > sink will randomly be Sink#0 or Sink#1, let us assume it is Sink#1, > > then users plug hdmi cable into the machine, the port hdmi-output will > > change to the state PA_AVAILABLE_YES, so the Sink#0 has a port with > > state YES, while the Sink#1 still has a port with state NO, in this > > situation it is reasonable to change the default_sink to Sink#0, but > > current code can't do that. This problem should be fixed by these two patches: https://patchwork.freedesktop.org/patch/139179/ https://patchwork.freedesktop.org/patch/139178/ The patches have been reviewed, but I haven't yet pushed them. I'm not sure if they'll be in the next release or not (I need to ask Georg and Arun if they want to grant a freeze exception for these patches). > > Let us suppose another situation, both hdmi cable and headphone are > > plugged into the machine, and the Sink#0 is the default sink, if users > > unplug the hdmi cable, the port hdmi-output is changed to NO while > > the port headphone is still kept YES, in this situation it is > > reasonable to switch the default_sink to Sink#1, but current code > > can't do that. This should be fixed too by those two patches mentioned above. -- Tanu https://www.patreon.com/tanuk