diff options
Diffstat (limited to 'sound/pci/cmipci.c')
-rw-r--r-- | sound/pci/cmipci.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index b4503385ea69..f5a4ac1ceef9 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -306,7 +306,7 @@ MODULE_PARM_DESC(joystick_port, "Joystick port address."); | |||
306 | #define CM_REG_FM_PCI 0x50 | 306 | #define CM_REG_FM_PCI 0x50 |
307 | 307 | ||
308 | /* | 308 | /* |
309 | * for CMI-8338 .. this is not valid for CMI-8738. | 309 | * access from SB-mixer port |
310 | */ | 310 | */ |
311 | #define CM_REG_EXTENT_IND 0xf0 | 311 | #define CM_REG_EXTENT_IND 0xf0 |
312 | #define CM_VPHONE_MASK 0xe0 /* Phone volume control (0-3) << 5 */ | 312 | #define CM_VPHONE_MASK 0xe0 /* Phone volume control (0-3) << 5 */ |
@@ -315,6 +315,7 @@ MODULE_PARM_DESC(joystick_port, "Joystick port address."); | |||
315 | #define CM_VSPKM 0x08 /* Speaker mute control, default high */ | 315 | #define CM_VSPKM 0x08 /* Speaker mute control, default high */ |
316 | #define CM_RLOOPREN 0x04 /* Rec. R-channel enable */ | 316 | #define CM_RLOOPREN 0x04 /* Rec. R-channel enable */ |
317 | #define CM_RLOOPLEN 0x02 /* Rec. L-channel enable */ | 317 | #define CM_RLOOPLEN 0x02 /* Rec. L-channel enable */ |
318 | #define CM_VADMIC3 0x01 /* Mic record boost */ | ||
318 | 319 | ||
319 | /* | 320 | /* |
320 | * CMI-8338 spec ver 0.5 (this is not valid for CMI-8738): | 321 | * CMI-8338 spec ver 0.5 (this is not valid for CMI-8738): |
@@ -488,32 +489,34 @@ struct snd_stru_cmipci { | |||
488 | 489 | ||
489 | 490 | ||
490 | /* read/write operations for dword register */ | 491 | /* read/write operations for dword register */ |
491 | inline static void snd_cmipci_write(cmipci_t *cm, unsigned int cmd, unsigned int data) | 492 | static inline void snd_cmipci_write(cmipci_t *cm, unsigned int cmd, unsigned int data) |
492 | { | 493 | { |
493 | outl(data, cm->iobase + cmd); | 494 | outl(data, cm->iobase + cmd); |
494 | } | 495 | } |
495 | inline static unsigned int snd_cmipci_read(cmipci_t *cm, unsigned int cmd) | 496 | |
497 | static inline unsigned int snd_cmipci_read(cmipci_t *cm, unsigned int cmd) | ||
496 | { | 498 | { |
497 | return inl(cm->iobase + cmd); | 499 | return inl(cm->iobase + cmd); |
498 | } | 500 | } |
499 | 501 | ||
500 | /* read/write operations for word register */ | 502 | /* read/write operations for word register */ |
501 | inline static void snd_cmipci_write_w(cmipci_t *cm, unsigned int cmd, unsigned short data) | 503 | static inline void snd_cmipci_write_w(cmipci_t *cm, unsigned int cmd, unsigned short data) |
502 | { | 504 | { |
503 | outw(data, cm->iobase + cmd); | 505 | outw(data, cm->iobase + cmd); |
504 | } | 506 | } |
505 | inline static unsigned short snd_cmipci_read_w(cmipci_t *cm, unsigned int cmd) | 507 | |
508 | static inline unsigned short snd_cmipci_read_w(cmipci_t *cm, unsigned int cmd) | ||
506 | { | 509 | { |
507 | return inw(cm->iobase + cmd); | 510 | return inw(cm->iobase + cmd); |
508 | } | 511 | } |
509 | 512 | ||
510 | /* read/write operations for byte register */ | 513 | /* read/write operations for byte register */ |
511 | inline static void snd_cmipci_write_b(cmipci_t *cm, unsigned int cmd, unsigned char data) | 514 | static inline void snd_cmipci_write_b(cmipci_t *cm, unsigned int cmd, unsigned char data) |
512 | { | 515 | { |
513 | outb(data, cm->iobase + cmd); | 516 | outb(data, cm->iobase + cmd); |
514 | } | 517 | } |
515 | 518 | ||
516 | inline static unsigned char snd_cmipci_read_b(cmipci_t *cm, unsigned int cmd) | 519 | static inline unsigned char snd_cmipci_read_b(cmipci_t *cm, unsigned int cmd) |
517 | { | 520 | { |
518 | return inb(cm->iobase + cmd); | 521 | return inb(cm->iobase + cmd); |
519 | } | 522 | } |
@@ -2133,8 +2136,12 @@ static snd_kcontrol_new_t snd_cmipci_mixers[] __devinitdata = { | |||
2133 | CMIPCI_MIXER_VOL_STEREO("Aux Playback Volume", CM_REG_AUX_VOL, 4, 0, 15), | 2136 | CMIPCI_MIXER_VOL_STEREO("Aux Playback Volume", CM_REG_AUX_VOL, 4, 0, 15), |
2134 | CMIPCI_MIXER_SW_STEREO("Aux Playback Switch", CM_REG_MIXER2, CM_VAUXLM_SHIFT, CM_VAUXRM_SHIFT, 0), | 2137 | CMIPCI_MIXER_SW_STEREO("Aux Playback Switch", CM_REG_MIXER2, CM_VAUXLM_SHIFT, CM_VAUXRM_SHIFT, 0), |
2135 | CMIPCI_MIXER_SW_STEREO("Aux Capture Switch", CM_REG_MIXER2, CM_RAUXLEN_SHIFT, CM_RAUXREN_SHIFT, 0), | 2138 | CMIPCI_MIXER_SW_STEREO("Aux Capture Switch", CM_REG_MIXER2, CM_RAUXLEN_SHIFT, CM_RAUXREN_SHIFT, 0), |
2136 | CMIPCI_MIXER_SW_MONO("Mic Boost", CM_REG_MIXER2, CM_MICGAINZ_SHIFT, 1), | 2139 | CMIPCI_MIXER_SW_MONO("Mic Boost Playback Switch", CM_REG_MIXER2, CM_MICGAINZ_SHIFT, 1), |
2137 | CMIPCI_MIXER_VOL_MONO("Mic Capture Volume", CM_REG_MIXER2, CM_VADMIC_SHIFT, 7), | 2140 | CMIPCI_MIXER_VOL_MONO("Mic Capture Volume", CM_REG_MIXER2, CM_VADMIC_SHIFT, 7), |
2141 | CMIPCI_SB_VOL_MONO("Phone Playback Volume", CM_REG_EXTENT_IND, 5, 7), | ||
2142 | CMIPCI_DOUBLE("Phone Playback Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 4, 4, 1, 0, 0), | ||
2143 | CMIPCI_DOUBLE("PC Speaker Playnack Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 3, 3, 1, 0, 0), | ||
2144 | CMIPCI_DOUBLE("Mic Boost Capture Switch", CM_REG_EXTENT_IND, CM_REG_EXTENT_IND, 0, 0, 1, 0, 0), | ||
2138 | }; | 2145 | }; |
2139 | 2146 | ||
2140 | /* | 2147 | /* |