https://bugs.freedesktop.org/show_bug.cgi?id=87002
--- Comment #16 from David Henningsson <[email protected]> --- (In reply to Mario Sanchez Prada from comment #15) > (In reply to David Henningsson from comment #14) > > Ok, I've looked at this issue now. > > > > The startup order is something like: > > > > 1) module_alsa_card's init_jacks initializes port availability, and for > > every port, we get a callback to port_available_hook_callback. No action is > > done here due to the fix for bug 73375. > > > > 2) module_alsa_card's init_profile is called, which in turn creates sources > > and sinks. At this point, we don't switch profiles: our current profile is > > analog, we don't switch away from profiles when ports become unavailable. > > > > The thing is, to solve this properly, we should need a callback *between* 1) > > and 2). We can't act on 1), because not all ports are guaranteed to have its > > availability set yet. But acting on 2) is too late, because then the profile > > is already set. > > What about letting 1) and 2) to finish, as if everything went fine and then, > as a last and desperate attempt to avoid having a profile with no ports > available, check if there's a better option and switch profiles if needed? > > That's the "hack" I've been experimenting with lately in this device (notice > that we use PA 5.0, but an stable release, not the trunk), and so far seemed > to work fine, although I'm not 100% it's a totally broken or not. > > You can check it in this commit: > https://github.com/mariospr/pulseaudio/commit/ > 4d3fdd5bbe8bc003f98403188e38a02110ba4c91 > > Please let me know what you think > > Thanks a lot for the feedback! Well, it's a hack. And the hackier, the more likely we regress some other use case. I'm more thinking that maybe one could initialize the port availability earlier, even before pa_card_new, using the pa_device_port_new_data_set_available function. Then we could act accordingly already in the callback in 1). -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.
_______________________________________________ pulseaudio-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs
