> Date: Fri, 1 May 2020 14:17:56 +0200 > From: Alexandre Ratchov <a...@caoua.org> > > On Fri, May 01, 2020 at 01:11:16PM +0200, Damien Couderc wrote: > > > > Speaking of the hdmi-only devices that were disabled in 2009: does the > > project still stand on this position in 2020? I made a quick search and it > > seems that more than half of the screens are audio capable now. I understand > > the defaults back in 2009, but now is it still true? > > There's nothing wrong with hdmi-only devices. As long as audio works > by default with no tweaks, nobody will object to re-enabling > them. AFAIK, this was the only reason to disable them.
Right. The main issue was that by default we only send output to audio0. On many machines the audio device associated with the HDMI port appears before the audio device that is associated with the speakers and/or headphone jack on our laptops. Therefore by default audio would go to an unconnected HDMI. Just enabling digital-only devices would not work. There are a couple things we could do here. 1. Make sndiod(8) responsible for picking a default output device. 2. Use locators (like I did for drm(4) and wsdisplay(4)) such that audio0 is always the non-HDMI audio device. Option #2 has the downside that if your HDMI audio device is the only supported audio device in the system, it will still be audio1 and therefore not the default device. On the other hand that has the benefit that if you later plug something like uaudio(4) into your system it will become the default device. Option #1 would give us more flexibility, but I'm not sure if the current audio(4) ioctls allow us to implement the proper heuristics. > > About the multi-codec devices, how do you see it ? Keeping all the codecs > > and adding a knob to switch between analog and digital to select the codec > > > > This seems to make sense. It's never entirely clear to me what exactly a "codec" is. But if it is possible to use both codecs simultaniously and indipendently, it would make sense to provide audio(4) devices for both.