On Fri, 31 Mar 2023 17:40:46 +0200, Jaroslav Kysela wrote: > > On 31. 03. 23 17:30, Takashi Iwai wrote: > > > That said, the slot preservation becomes effective only when multiple > > devices are connected and they are on/off at the same time. In such a > > case, the device order may be changed at each screen on/off with the > > current code, while this patch allows keeping the order. Maybe I > > should emphasize about the multiple devices in the patch description. > > I though about possibility to remove a monitor completely. Then you > can have a gap in the PCM device list. Do you mean the situation where multiple monitors were connected and the system is moved afterward to a single monitor environment? Then it might be assigned to the second PCM slot, and that's the designed behavior. In other cases, as long as only a single monitor is used, it'll still be assigned to the first PCM slot even with this patch. > >> The sound server should combine the persistent path only from the ELD > >> information for the HDMI devices (if present). The problem may be when > >> multiple similar monitors are connected to the machine. It would be > >> probably nice to have an unique PCM device name for this usage with > >> the serial number of the connected monitor (but I don't think it's in > >> ELD? - it is in the EDID spec thought). > > > > The name string appears actually in the dialog. But the automatic > > switch doesn't happen. So we need some improvement / fix. > > The switch does not happen because PA/PW use the sink/output path > which use the ALSA PCM device identification. This sink/output path > also identifies the volume/port preservation. It is not ideal for the > hotplug audio devices like HDMI, so we should have another way to > identify those devices. The ALSA's PCM name / subdevice name fields in > the info structure may be usable for this. Well, at least, the jack disconnection and re-connection should be notified in that case, and I thought the switching may happen. But apparently not. Takashi