diff options
Diffstat (limited to 'sound/pci/cmipci.c')
-rw-r--r-- | sound/pci/cmipci.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 329968edca9b..f4e573555da3 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -73,7 +73,7 @@ MODULE_PARM_DESC(mpu_port, "MPU-401 port."); | |||
73 | module_param_array(fm_port, long, NULL, 0444); | 73 | module_param_array(fm_port, long, NULL, 0444); |
74 | MODULE_PARM_DESC(fm_port, "FM port."); | 74 | MODULE_PARM_DESC(fm_port, "FM port."); |
75 | module_param_array(soft_ac3, bool, NULL, 0444); | 75 | module_param_array(soft_ac3, bool, NULL, 0444); |
76 | MODULE_PARM_DESC(soft_ac3, "Sofware-conversion of raw SPDIF packets (model 033 only)."); | 76 | MODULE_PARM_DESC(soft_ac3, "Software-conversion of raw SPDIF packets (model 033 only)."); |
77 | #ifdef SUPPORT_JOYSTICK | 77 | #ifdef SUPPORT_JOYSTICK |
78 | module_param_array(joystick_port, int, NULL, 0444); | 78 | module_param_array(joystick_port, int, NULL, 0444); |
79 | MODULE_PARM_DESC(joystick_port, "Joystick port address."); | 79 | MODULE_PARM_DESC(joystick_port, "Joystick port address."); |
@@ -656,8 +656,8 @@ out: | |||
656 | } | 656 | } |
657 | 657 | ||
658 | /* | 658 | /* |
659 | * Program pll register bits, I assume that the 8 registers 0xf8 upto 0xff | 659 | * Program pll register bits, I assume that the 8 registers 0xf8 up to 0xff |
660 | * are mapped onto the 8 ADC/DAC sampling frequency which can be choosen | 660 | * are mapped onto the 8 ADC/DAC sampling frequency which can be chosen |
661 | * at the register CM_REG_FUNCTRL1 (0x04). | 661 | * at the register CM_REG_FUNCTRL1 (0x04). |
662 | * Problem: other ways are also possible (any information about that?) | 662 | * Problem: other ways are also possible (any information about that?) |
663 | */ | 663 | */ |
@@ -666,7 +666,7 @@ static void snd_cmipci_set_pll(struct cmipci *cm, unsigned int rate, unsigned in | |||
666 | unsigned int reg = CM_REG_PLL + slot; | 666 | unsigned int reg = CM_REG_PLL + slot; |
667 | /* | 667 | /* |
668 | * Guess that this programs at reg. 0x04 the pos 15:13/12:10 | 668 | * Guess that this programs at reg. 0x04 the pos 15:13/12:10 |
669 | * for DSFC/ASFC (000 upto 111). | 669 | * for DSFC/ASFC (000 up to 111). |
670 | */ | 670 | */ |
671 | 671 | ||
672 | /* FIXME: Init (Do we've to set an other register first before programming?) */ | 672 | /* FIXME: Init (Do we've to set an other register first before programming?) */ |
@@ -2507,14 +2507,12 @@ static int snd_cmipci_line_in_mode_info(struct snd_kcontrol *kcontrol, | |||
2507 | struct snd_ctl_elem_info *uinfo) | 2507 | struct snd_ctl_elem_info *uinfo) |
2508 | { | 2508 | { |
2509 | struct cmipci *cm = snd_kcontrol_chip(kcontrol); | 2509 | struct cmipci *cm = snd_kcontrol_chip(kcontrol); |
2510 | static char *texts[3] = { "Line-In", "Rear Output", "Bass Output" }; | 2510 | static const char *const texts[3] = { |
2511 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 2511 | "Line-In", "Rear Output", "Bass Output" |
2512 | uinfo->count = 1; | 2512 | }; |
2513 | uinfo->value.enumerated.items = cm->chip_version >= 39 ? 3 : 2; | 2513 | |
2514 | if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) | 2514 | return snd_ctl_enum_info(uinfo, 1, |
2515 | uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1; | 2515 | cm->chip_version >= 39 ? 3 : 2, texts); |
2516 | strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); | ||
2517 | return 0; | ||
2518 | } | 2516 | } |
2519 | 2517 | ||
2520 | static inline unsigned int get_line_in_mode(struct cmipci *cm) | 2518 | static inline unsigned int get_line_in_mode(struct cmipci *cm) |
@@ -2564,14 +2562,9 @@ static int snd_cmipci_line_in_mode_put(struct snd_kcontrol *kcontrol, | |||
2564 | static int snd_cmipci_mic_in_mode_info(struct snd_kcontrol *kcontrol, | 2562 | static int snd_cmipci_mic_in_mode_info(struct snd_kcontrol *kcontrol, |
2565 | struct snd_ctl_elem_info *uinfo) | 2563 | struct snd_ctl_elem_info *uinfo) |
2566 | { | 2564 | { |
2567 | static char *texts[2] = { "Mic-In", "Center/LFE Output" }; | 2565 | static const char *const texts[2] = { "Mic-In", "Center/LFE Output" }; |
2568 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 2566 | |
2569 | uinfo->count = 1; | 2567 | return snd_ctl_enum_info(uinfo, 1, 2, texts); |
2570 | uinfo->value.enumerated.items = 2; | ||
2571 | if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) | ||
2572 | uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1; | ||
2573 | strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); | ||
2574 | return 0; | ||
2575 | } | 2568 | } |
2576 | 2569 | ||
2577 | static int snd_cmipci_mic_in_mode_get(struct snd_kcontrol *kcontrol, | 2570 | static int snd_cmipci_mic_in_mode_get(struct snd_kcontrol *kcontrol, |