--- sparc-utils-1.9.orig/audioctl-1.3/audioctl.c
+++ sparc-utils-1.9/audioctl-1.3/audioctl.c
@@ -149,6 +149,7 @@
 	{ "speaker", 		AUDIO_SPEAKER },
 	{ "headphone",		AUDIO_HEADPHONE },
 	{ "line out",		AUDIO_LINE_OUT },
+	{ "line_out",		AUDIO_LINE_OUT },
 	{ 0 }
 };
 
@@ -158,8 +159,11 @@
 } iports[] = {
 	{ "microphone", 	AUDIO_MICROPHONE },
 	{ "line in",		AUDIO_LINE_IN },
+	{ "line_in",		AUDIO_LINE_IN },
 	{ "internal cd",	AUDIO_CD },
+	{ "internal_cd",	AUDIO_CD },
 	{ "analog loopback",	AUDIO_ANALOG_LOOPBACK },
+	{ "analog_loopback",	AUDIO_ANALOG_LOOPBACK },
 	{ 0 }
 };
 
@@ -338,7 +342,7 @@
 	int pos, i;
 
 	if (ioctl(fd, AUDIO_GETDEV, &adev) < 0) {
-		fprintf(stderr, "AUDIO_GETDEV\n");
+		perror("ioctl(getdev)");
 		exit(1);
 	}
 #if 0
@@ -358,7 +362,7 @@
 	sprintf(encbuf, "not yet implemented");
 #endif
 	if (ioctl(fd, AUDIO_GETINFO, &info) < 0)
-		fprintf(stderr, "AUDIO_GETINFO\n");
+		perror("ioctl(getinfo)");
 }
 
 void
@@ -413,17 +417,19 @@
 	fd = open(file, O_WRONLY);
 	if (fd < 0)
 		fd = open(file, O_RDONLY);
-	if (fd < 0)
-		fprintf(stderr, "%s\n", file);
+	if (fd < 0) {
+		perror(file);
+		exit(0);
+	}
     
 	/* Check if stdout is the same device as the audio device. */
 	if (fstat(fd, &dstat) < 0) {
-		fprintf(stderr, "fstat au\n");
+		perror("fstat(au)");
 		exit(0);
 	}
 
 	if (fstat(STDOUT_FILENO, &ostat) < 0) {
-		fprintf(stderr, "fstat stdout\n");
+		perror("fstat(stdout)");
 		exit(0);
 	}
 #if 1
@@ -475,7 +481,7 @@
 				argv++;
 			}
 			if (ioctl(fd, AUDIO_SETINFO, &info) < 0) {
-				fprintf(stderr, "set failed\n");
+				perror("ioctl(setinfo)");
 				exit(1);
 			}
 			if (sep) {
