iPAQ h5550 sound card patch
Dmitriy Korovkin <[email protected]> Sat, 13 Jan 2007 23:04:03 +0300
| Newsgroups | gmane.comp.handhelds.opie.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Erik, It's better late than never. Here is the sound card patch for iPAQ h5550. As you see it changes variables in ioctls. It also changes the range of the sound volume (156 - 255 is actually nothing). Regards, -- Dmitriy _______________________________________________ http://opie.handhelds.org/cgi-bin/moin.cgi/DeveloperWikiIndex Opie-devel mailing list [email protected] https://handhelds.org/mailman/listinfo/opie-devel
ak4535.patch
(text/plain, 1.1 KB)
Index: ak4535.c
===================================================================
RCS file: /cvs/linux/kernel/drivers/sound/ak4535.c,v
retrieving revision 1.23
diff -u -r1.23 ak4535.c
--- ak4535.c 29 Mar 2005 23:28:35 -0000 1.23
+++ ak4535.c 13 Jan 2007 20:00:00 -0000
@@ -25,7 +25,7 @@
#include "ak4535.h"
#define REC_MASK (SOUND_MASK_LINE | SOUND_MASK_MIC)
-#define DEV_MASK (REC_MASK | SOUND_MASK_PCM |SOUND_MASK_BASS)
+#define DEV_MASK (REC_MASK | SOUND_MASK_PCM | SOUND_MASK_BASS | SOUND_MASK_VOLUME)
#define REG_MAX 0x10
@@ -432,7 +432,6 @@
switch (nr) {
case SOUND_MIXER_PCM:
- akm->volume = val;
akm->pcm = val;
akm->mod_cnt++;
/* input value [0,100], ak4535 uses [0,7] */
@@ -453,12 +452,14 @@
case SOUND_MIXER_TREBLE:
return -EINVAL;
+ case SOUND_MIXER_VOLUME:
case SOUND_MIXER_LINE:
+ akm->volume = val;
akm->line = val;
akm->mod_cnt++;
/* input value [0,100], ak4535 uses [255,0] */
val = gain.left;
- val = 0xff & ~(255 * val / 100);
+ val = 156 - (val * 156) / 100;
ak4535_update(clnt, I2C_SET_LINE_GAIN, &val);
break;