p16v.c (f01387d2693813eb5271a3448e6a082322c7d75d) | p16v.c (1541c66d3bb78c8a388025b074c75658c790b72f) |
---|---|
1/* 2 * Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk> 3 * Driver p16v chips 4 * Version: 0.25 5 * 6 * FEATURES currently supported: 7 * Output fixed at S32_LE, 2 channel to hw:0,0 8 * Rates: 44.1, 48, 96, 192. --- 743 unchanged lines hidden (view full) --- 752 return 1; 753 } 754 return 0; 755} 756 757static int snd_p16v_capture_source_info(struct snd_kcontrol *kcontrol, 758 struct snd_ctl_elem_info *uinfo) 759{ | 1/* 2 * Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk> 3 * Driver p16v chips 4 * Version: 0.25 5 * 6 * FEATURES currently supported: 7 * Output fixed at S32_LE, 2 channel to hw:0,0 8 * Rates: 44.1, 48, 96, 192. --- 743 unchanged lines hidden (view full) --- 752 return 1; 753 } 754 return 0; 755} 756 757static int snd_p16v_capture_source_info(struct snd_kcontrol *kcontrol, 758 struct snd_ctl_elem_info *uinfo) 759{ |
760 static char *texts[8] = { | 760 static const char * const texts[8] = { |
761 "SPDIF", "I2S", "SRC48", "SRCMulti_SPDIF", "SRCMulti_I2S", 762 "CDIF", "FX", "AC97" 763 }; 764 | 761 "SPDIF", "I2S", "SRC48", "SRCMulti_SPDIF", "SRCMulti_I2S", 762 "CDIF", "FX", "AC97" 763 }; 764 |
765 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 766 uinfo->count = 1; 767 uinfo->value.enumerated.items = 8; 768 if (uinfo->value.enumerated.item > 7) 769 uinfo->value.enumerated.item = 7; 770 strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); 771 return 0; | 765 return snd_ctl_enum_info(uinfo, 1, 8, texts); |
772} 773 774static int snd_p16v_capture_source_get(struct snd_kcontrol *kcontrol, 775 struct snd_ctl_elem_value *ucontrol) 776{ 777 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 778 779 ucontrol->value.enumerated.item[0] = emu->p16v_capture_source; --- 20 unchanged lines hidden (view full) --- 800 snd_emu10k1_ptr20_write(emu, BASIC_INTERRUPT, 0, source | mask); 801 } 802 return change; 803} 804 805static int snd_p16v_capture_channel_info(struct snd_kcontrol *kcontrol, 806 struct snd_ctl_elem_info *uinfo) 807{ | 766} 767 768static int snd_p16v_capture_source_get(struct snd_kcontrol *kcontrol, 769 struct snd_ctl_elem_value *ucontrol) 770{ 771 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 772 773 ucontrol->value.enumerated.item[0] = emu->p16v_capture_source; --- 20 unchanged lines hidden (view full) --- 794 snd_emu10k1_ptr20_write(emu, BASIC_INTERRUPT, 0, source | mask); 795 } 796 return change; 797} 798 799static int snd_p16v_capture_channel_info(struct snd_kcontrol *kcontrol, 800 struct snd_ctl_elem_info *uinfo) 801{ |
808 static char *texts[4] = { "0", "1", "2", "3", }; | 802 static const char * const texts[4] = { "0", "1", "2", "3", }; |
809 | 803 |
810 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 811 uinfo->count = 1; 812 uinfo->value.enumerated.items = 4; 813 if (uinfo->value.enumerated.item > 3) 814 uinfo->value.enumerated.item = 3; 815 strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); 816 return 0; | 804 return snd_ctl_enum_info(uinfo, 1, 4, texts); |
817} 818 819static int snd_p16v_capture_channel_get(struct snd_kcontrol *kcontrol, 820 struct snd_ctl_elem_value *ucontrol) 821{ 822 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 823 824 ucontrol->value.enumerated.item[0] = emu->p16v_capture_channel; --- 113 unchanged lines hidden --- | 805} 806 807static int snd_p16v_capture_channel_get(struct snd_kcontrol *kcontrol, 808 struct snd_ctl_elem_value *ucontrol) 809{ 810 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 811 812 ucontrol->value.enumerated.item[0] = emu->p16v_capture_channel; --- 113 unchanged lines hidden --- |