Linux PARISC architecture development
 help / color / mirror / Atom feed
* [parisc-linux] [PATCH] harmony audio driver
@ 2001-09-05 23:21 Andi
  2001-09-06  1:25 ` Andi
  0 siblings, 1 reply; 3+ messages in thread
From: Andi @ 2001-09-05 23:21 UTC (permalink / raw)
  To: parisc-linux

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

hi,

I implemented SNDCTL_DSP_CHANNELS in harmony.c, which is used to query
or set the number of sound channels. This allows some sound apps to run
that used to quit with an error.

I also added SNDCTL_DSP_SYNC that only returns 0 at the moment. This is
needed since neary all sound apps call this during initialization.

The sound driver however is still broken, the only program I know that
works 100% correctly is xmms. Maybe I will do some bug fixing later if
anyone is interested.

PS: is there a working patch to get keyboard running again on 712, it is
broken for months (since kernels after 2.4.0-paXX)

bye
   andi


[-- Attachment #2: harmony.patch --]
[-- Type: text/plain, Size: 863 bytes --]

--- harmony.c	2001/08/19 15:21:11	1.13
+++ harmony.c	2001/09/05 23:07:13
@@ -680,6 +680,24 @@
 		harmony_set_rate(harmony_detect_rate(ival));
 		return put_user(ival, (int*) arg);
 
+	case SNDCTL_DSP_CHANNELS:
+		if (get_user(ival, (int *) arg))
+			return -EFAULT;
+		
+		if (ival > 0) {
+			if (ival == 1)
+				harmony_set_stereo(HARMONY_SS_MONO);
+			else
+				harmony_set_stereo(HARMONY_SS_STEREO);													
+		}
+
+		if (harmony.stereo_select == HARMONY_SS_STEREO)
+			ival = 2;
+		else
+			ival = 1;
+
+		return put_user(ival, (int *) arg);			
+			
 	case SNDCTL_DSP_STEREO:		/* _SIOWR('P', 3, int) */
 		if (get_user(ival, (int *) arg))
 			return -EFAULT;
@@ -693,6 +711,9 @@
 		return put_user(ival, (int *) arg);
 		
 	case SNDCTL_DSP_RESET:
+		return 0;
+	
+	case SNDCTL_DSP_SYNC:
 		return 0;
 
 	case SNDCTL_DSP_SETFMT:		/* _SIOWR('P',5, int) */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [parisc-linux] [PATCH] harmony audio driver
  2001-09-05 23:21 [parisc-linux] [PATCH] harmony audio driver Andi
@ 2001-09-06  1:25 ` Andi
  2001-09-06  9:29   ` Helge Deller
  0 siblings, 1 reply; 3+ messages in thread
From: Andi @ 2001-09-06  1:25 UTC (permalink / raw)
  To: parisc-linux

> The sound driver however is still broken, the only program I know that
> works 100% correctly is xmms.

I just found out that mpg123 runs and sounds perfectly now(now you should
merge the patch in ;-) )

PS: to compile mpg123 you can type make linux-ppc, it works.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [parisc-linux] [PATCH] harmony audio driver
  2001-09-06  1:25 ` Andi
@ 2001-09-06  9:29   ` Helge Deller
  0 siblings, 0 replies; 3+ messages in thread
From: Helge Deller @ 2001-09-06  9:29 UTC (permalink / raw)
  To: Andi, parisc-linux

> PS: to compile mpg123 you can type make linux-ppc, it works.

I think I fixed this last week in the debian-source (which should be upstream now),
so "make linux-hppa" should work too.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-09-06  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-05 23:21 [parisc-linux] [PATCH] harmony audio driver Andi
2001-09-06  1:25 ` Andi
2001-09-06  9:29   ` Helge Deller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox