harmony audio driver
PATCH 1/1 harmony audio driver
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
harmony.c +21 -0
@@ -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) */
Quoted 2 lines
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.
Quoted 1 line
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.