Lasi harmony driver with mixer
Here is a patch to get mixer working on Lasi harmony audio. It's based on work of Alex deVries.
At the boot time, the sound is muted.
If all works fine, you can use any mixer application which support OSS Interface to change gains.
For tests, I used aumix which is available at
http://www.jpj.net/~trevor/aumix.html
You still can only play 8 bits mono u-law file.
Matthieu Delahaye
ESIEE Team
http://www.esiee.fr/puffin
drivers/sound/Makefile +10 -1
@@ -108,7 +108,7 @@ # Declare multi-part drivers. list-multi := sound.o gus.o pas2.o sb.o sb_lib.o vidc_mod.o \ - soundcore.o wavefront.o + soundcore.o wavefront.o harmony.o sound-objs := \ dev_table.o soundcard.o sound_syms.o \
@@ -124,6 +124,7 @@ sb_lib-objs := sb_common.o sb_audio.o sb_midi.o sb_mixer.o sb_ess.o vidc_mod-objs := vidc.o vidc_fill.o wavefront-objs := wavfront.o wf_midi.o yss225.o +harmony-objs := harmony_driver.o harmony_sound.o harmony_mixer.o # Extract lists of the multi-part drivers.
@@ -189,6 +190,9 @@ wavefront.o: $(wavefront-objs) $(LD) -r -o $@ $(wavefront-objs) +harmony.o: $(harmony-objs) + $(LD) -r -o $@ $(harmony-objs.o) + # Firmware files that need translation # # The translated files are protected by a file that keeps track
@@ -332,3 +336,8 @@ ifneq ($(FILES_BOOT_CHANGED),) $(FILES_BOOT_CHANGED): dummy endif + + + + +
drivers/sound/harmony.h +135 -0
135 lines not on this page · raw message
drivers/sound/harmony_driver.c +183 -0
183 lines not on this page · raw message
drivers/sound/harmony_mixer.c +345 -0
345 lines not on this page · raw message
drivers/sound/harmony_mixer.h +58 -0
58 lines not on this page · raw message
drivers/sound/harmony_sound.c +603 -0
603 lines not on this page · raw message
Hi matthieu, i have a few comments.
drivers/sound/harmony_driver.c line 19
Quoted 9 lines · Matthieu Delahaye
drivers/sound/harmony_driver.c +9
-0+Bugs: + +1. Doesn't work on 715/old + +This driver doesn't work on 715/old machines, which include the 715/75. The +chip used for this is technically called 'Vivace', which is identical to +Harmony. Should be easy to fix. It has something to do with the way it is +reported by the inventory code. The HPA is not that of Lasi or ASP so the +interrupts aren't registered properly.
afair, prumpf had his harmony driver working on the 715/scorpio. perhaps by looking at his source you could see what is missing?
drivers/sound/harmony_mixer.c line 209
Quoted 4 lines
drivers/sound/harmony_mixer.c +4
-0+int harmony_mixer_ioctl (struct inode * inode,struct file * file,unsigned int cmd,unsigned long arg) +{ +int val; +int ret;
[...]
it'd be nice if you could rformat this to follow CodingStyle.
drivers/sound/harmony_mixer.c line 287
Quoted 12 lines
drivers/sound/harmony_mixer.c +12
-0+static struct file_operations harmony_mixer_fops = +{ + owner:THIS_MODULE , + llseek:NULL , + read:NULL , + write:NULL , + poll:NULL , + ioctl: harmony_mixer_ioctl, + mmap:NULL , + open:NULL , + release:NULL , +};
Don't initialise unused entries to NULL. That's the point of using the new syntax for struct initialisation -- that we don't need to list unused ones.
Signature · 1 line
Revolutions do not require corporate support.
Quoted 3 lines · Matthew Wilcox
afair, prumpf had his harmony driver working on the 715/scorpio. perhaps by looking at his source you could see what is missing?
I started harmony.c with the latest version of prumpf's driver, which really didn't do anything at all. I checked every tree I could find (including his trees on sourceforge),
but the only one I found may have at one point played a hard coded file. There's not a lot left of it in my driver. I definitely couldn't get it to work on a 712, let alone a 715/old.
The audio HPA on the 715/old is way out of bounds for it to be a part of Lasi or ASP, so it looks like another audio chip. It doesn't have the right ID register, and doesn't respond to any setup attempts.
Matthieu, it's good to hear about the gain control patches. Now go sort out the 16 bit audio format problem! :)
- Alex
Signature · 4 lines
Alex deVries, Principal Solutions Architect, The Puffins at Linuxcare 613.562.2759 tel [email protected], http://www.linuxcare.com/ Linuxcare, Support for the revolution.
Quoted 8 lines · Matthew Wilcox
Review
Quoted 4 lines
(quoted diff) +4
-0+int harmony_mixer_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg) +{ + int val; + int ret;[...]
it'd be nice if you could rformat this to follow CodingStyle.
[...]
here it is the corrected patch according to your remarks
Matthieu Delahaye
ESIEE Team
http://www.esiee.fr/puffin
drivers/sound/Makefile +10 -1
@@ -108,7 +108,7 @@ # Declare multi-part drivers. list-multi := sound.o gus.o pas2.o sb.o sb_lib.o vidc_mod.o \ - soundcore.o wavefront.o + soundcore.o wavefront.o harmony.o sound-objs := \ dev_table.o soundcard.o sound_syms.o \
@@ -124,6 +124,7 @@ sb_lib-objs := sb_common.o sb_audio.o sb_midi.o sb_mixer.o sb_ess.o vidc_mod-objs := vidc.o vidc_fill.o wavefront-objs := wavfront.o wf_midi.o yss225.o +harmony-objs := harmony_driver.o harmony_sound.o harmony_mixer.o # Extract lists of the multi-part drivers.
@@ -189,6 +190,9 @@ wavefront.o: $(wavefront-objs) $(LD) -r -o $@ $(wavefront-objs) +harmony.o: $(harmony-objs) + $(LD) -r -o $@ $(harmony-objs.o) + # Firmware files that need translation # # The translated files are protected by a file that keeps track
@@ -332,3 +336,8 @@ ifneq ($(FILES_BOOT_CHANGED),) $(FILES_BOOT_CHANGED): dummy endif + + + + +
drivers/sound/harmony.h +135 -0
135 lines not on this page · raw message
drivers/sound/harmony_driver.c +183 -0
183 lines not on this page · raw message
drivers/sound/harmony_mixer.c +317 -0
317 lines not on this page · raw message
drivers/sound/harmony_mixer.h +58 -0
58 lines not on this page · raw message
drivers/sound/harmony_sound.c +603 -0
603 lines not on this page · raw message
Quoted 3 lines · Alex deVries
Matthieu, it's good to hear about the gain control patches. Now go sort out the 16 bit audio format problem! :)
Ok. We now start working on 16 bit audio (and others formats). More over we'll have a look on the two unexpeted clicks at the begining of each sound resitution.
Matthieu Delahaye
ESIEE Team
http://www.esiee.fr/puffin