[BACK]Return to patch-src_libout123_modules_sun.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / audio / mpg123 / patches

File: [cvs.NetBSD.org] / pkgsrc / audio / mpg123 / patches / patch-src_libout123_modules_sun.c (download)

Revision 1.1, Wed Apr 27 21:15:23 2022 UTC (19 months, 1 week ago) by nia
Branch: MAIN
CVS Tags: pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, HEAD

mpg123: Fix device opening on NetBSD on rpi.  Normal applications setting
the audio output port in 2022 considered harmful.

$NetBSD: patch-src_libout123_modules_sun.c,v 1.1 2022/04/27 21:15:23 nia Exp $

Disable legacy code for fiddling with mixer parameters like volume
and output port.  This is not really something we want done on
modern Solaris on NetBSD where the device is abstracted, and
setting the port can fail loudly on some hardware like
Raspberry Pis.

--- src/libout123/modules/sun.c.orig	2021-12-10 07:00:58.000000000 +0000
+++ src/libout123/modules/sun.c
@@ -174,7 +174,8 @@ static int open_sun(out123_handle *ao)
 #endif
 	
 	if(reset_parameters_sun(ao) < 0) return -1;
-	
+
+#if 0	
 	AUDIO_INITINFO(&ainfo);
 	
 	if(ao->flags > 0)
@@ -193,6 +194,7 @@ static int open_sun(out123_handle *ao)
 	
 	if(ioctl(ao->fn, AUDIO_SETINFO, &ainfo) == -1)
 		return -1;
+#endif
 	
 	return ao->fn;
 }