Yes please!

On 2023 Oct 29 (Sun) at 14:55:09 +0100 (+0100), Christopher Zimmermann wrote:
:Hi,
:
:for me azalia HDMI audio playback works fine. According to [1] it had or
:still has problems. For machines where the default audio should not be
:(possibly broken) rsnd/0, but rsnd/1 this can be configured in sndiod or
:AUDIODEVICE.
:
:This diff would attach azalia even when there are only HDMI codecs available.
:
:
:Christopher
:
:[1] 
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/azalia.c?rev=1.155&content-type=text/x-cvsweb-markup
:
:
:
:Index: azalia.c
:===================================================================
:RCS file: /cvs/src/sys/dev/pci/azalia.c,v
:retrieving revision 1.284
:diff -u -p -r1.284 azalia.c
:--- azalia.c   30 Jul 2023 08:46:03 -0000      1.284
:+++ azalia.c   29 Oct 2023 13:39:04 -0000
:@@ -950,28 +950,19 @@ azalia_init_codecs(azalia_t *az)
:               return(1);
:       }
:-      /* Use the first codec capable of analog I/O.  If there are none,
:-       * use the first codec capable of digital I/O.  Skip HDMI codecs.
:-       */
:+      /* Prefer analog over digital codecs over HDMI codecs. */
:       c = -1;
:       for (i = 0; i < az->ncodecs; i++) {
:-              codec = &az->codecs[i];
:-              if ((codec->audiofunc < 0) ||
:-                  (codec->codec_type == AZ_CODEC_TYPE_HDMI))
:-                      continue;
:-              if (codec->codec_type == AZ_CODEC_TYPE_DIGITAL) {
:-                      if (c < 0)
:-                              c = i;
:-              } else {
:+              if (az->codecs[i].audiofunc >= 0 &&
:+                  (c = -1 ||
:+                  az->codecs[i].codec_type < az->codecs[c].codec_type))
:                       c = i;
:-                      break;
:-              }
:       }
:-      az->codecno = c;
:-      if (az->codecno < 0) {
:+      if (c == -1) {
:               printf("%s: no supported codecs\n", XNAME(az));
:               return(1);
:       }
:+      az->codecno = c;
:       printf("%s: codecs: ", XNAME(az));
:       for (i = 0; i < az->ncodecs; i++) {
:

Reply via email to