tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Audio system preferring surround formats



If there are no objections, I will commit this patch:

Index: sys/dev/audio/audio.c
===================================================================
RCS file: /cvsroot/src/sys/dev/audio/audio.c,v
retrieving revision 1.91
diff -u -r1.91 audio.c
--- sys/dev/audio/audio.c	14 Feb 2021 03:41:13 -0000	1.91
+++ sys/dev/audio/audio.c	22 Apr 2021 11:31:20 -0000
@@ -6572,7 +6572,10 @@
 		    query.fmt.precision == AUDIO_INTERNAL_BITS) {
 			score += 0x10;
 		}
-		score += query.fmt.channels;
+
+		/* Do not prefer surround formats */
+		if (query.fmt.channels <= 2)
+			score += query.fmt.channels;
 
 		if (score < cand_score) {
 			DPRINTF(1, "fmt[%d] skip; score 0x%x < 0x%x\n", i,


Home | Main Index | Thread Index | Old Index