shithub: riscv

Download patch

ref: 3331ccc6a4e1959253e3d34beee495d191484660
parent: 9a01a24aa53d55dc1f3c4a7c4bee13fe60b6467a
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Aug 17 09:20:01 EDT 2022

aux/wm8960: provide hardcoded "speed" in volume file

--- a/sys/src/cmd/aux/wm8960.c
+++ b/sys/src/cmd/aux/wm8960.c
@@ -87,12 +87,9 @@
 {
 	int zc;
 
-	l = CLAMP(l, 0, 100);
-	r = CLAMP(r, 0, 100);
+	o->vol[0] = l = CLAMP(l, 0, 100);
+	o->vol[1] = r = CLAMP(r, 0, 100);
 
-	o->vol[0] = l;
-	o->vol[1] = r;
-
 	if(l > 0)
 		l += o->volmax - 100;
 	if(r > 0)
@@ -149,6 +146,7 @@
 	}else if(r->fid->file->aux == (void*)Vol){
 		for(i = 0, o = out; i < Nout; i++, o++)
 			s = seprint(s, e, "%s %d %d\n", o->name, o->vol[0], o->vol[1]);
+		seprint(s, e, "speed 44100\n");
 	}
 
 	readstr(r, msg);