Changeset 135 for GPL/trunk/alsa-kernel
- Timestamp:
- Jun 13, 2007, 9:06:25 AM (18 years ago)
- Location:
- GPL/trunk/alsa-kernel
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/core/memory.c
r73 r135 269 269 return -EFAULT; 270 270 count -= c; 271 (char*)dst +=c;272 (char*)src +=c;271 dst = (char*)dst + c; 272 src = (char*)src + c; 273 273 } 274 274 return 0; … … 300 300 memcpy_toio((void*)dst, buf, c); 301 301 count -= c; 302 (char*)dst +=c;303 (char*)src +=c;302 dst = (char*)dst + c; 303 src = (char*)src + c; 304 304 } 305 305 return 0; -
GPL/trunk/alsa-kernel/core/rawmidi.c
r34 r135 21 21 22 22 #define SNDRV_MAIN_OBJECT_FILE 23 24 #define INCL_NOPMAPI 25 #include <os2.h> 26 #include <ossdefos2.h> 27 #include <ossidc32.h> 28 23 29 #include <sound/driver.h> 24 30 #include <sound/rawmidi.h> … … 837 843 * Returns the size of read data, or a negative error code on failure. 838 844 */ 845 839 846 int snd_rawmidi_receive(snd_rawmidi_substream_t * substream, const unsigned char *buffer, int count) 840 847 { -
GPL/trunk/alsa-kernel/core/seq/seq_clientmgr.c
r129 r135 2181 2181 2182 2182 2183 static longsnd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)2183 static int snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 2184 2184 { 2185 2185 struct snd_seq_client *client = file->private_data; -
GPL/trunk/alsa-kernel/drivers/dummy.c
r32 r135 227 227 bps *= snd_pcm_format_width(runtime->format); 228 228 bps /= 8; 229 if (bps <= 0)229 if (bps == 0) 230 230 return -EINVAL; 231 231 dpcm->pcm_bps = bps; … … 323 323 } 324 324 325 // 12 Jun 07 SHL fixme to be in some .h 326 extern void * snd_malloc_pages_fallback(size_t size, unsigned int flags, size_t *res_size); 327 325 328 static int snd_card_dummy_playback_open(snd_pcm_substream_t * substream) 326 329 { … … 438 441 0, 0, snd_dummy_volume_info, \ 439 442 snd_dummy_volume_get, snd_dummy_volume_put, \ 443 0, \ 440 444 addr } 441 445 -
GPL/trunk/alsa-kernel/isa/opl3sa2.c
r32 r135 161 161 static unsigned char snd_opl3sa_read(unsigned long port, unsigned char reg) 162 162 { 163 u nsigned longflags;163 u32 flags; 164 164 unsigned char result; 165 165 166 save_flags( flags);166 save_flags(&flags); // 12 Jun 07 SHL 167 167 cli(); 168 168 #if 0 … … 182 182 unsigned char reg, unsigned char value) 183 183 { 184 u nsigned longflags;185 186 save_flags( flags);184 u32 flags; 185 186 save_flags(&flags); 187 187 cli(); 188 188 #if 0 … … 261 261 } 262 262 263 static voidsnd_opl3sa_interrupt(int irq, void *dev_id, struct pt_regs *regs)263 static int snd_opl3sa_interrupt(int irq, void *dev_id, struct pt_regs *regs) 264 264 { 265 265 unsigned short status; … … 267 267 268 268 if (oplcard == NULL || oplcard->card == NULL) 269 return ;269 return 0; 270 270 271 271 spin_lock(&oplcard->reg_lock); … … 290 290 snd_ctl_notify(oplcard->card, SNDRV_CTL_EVENT_MASK_VALUE, &oplcard->master_volume->id); 291 291 } 292 return 0; 292 293 } 293 294 … … 297 298 0, 0, snd_opl3sa_info_single, \ 298 299 snd_opl3sa_get_single, snd_opl3sa_put_single, \ 300 0, \ 299 301 reg | (shift << 8) | (mask << 16) | (invert << 24) } 300 302 … … 364 366 0, 0, snd_opl3sa_info_double, \ 365 367 snd_opl3sa_get_double, snd_opl3sa_put_double, \ 368 0, \ 366 369 left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } 367 370 -
GPL/trunk/alsa-kernel/pci/ali5451/ali5451.c
r34 r135 1800 1800 { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, xindex,\ 1801 1801 0, 0, snd_ali5451_spdif_info, snd_ali5451_spdif_get, \ 1802 snd_ali5451_spdif_put, value}1802 snd_ali5451_spdif_put, 0, value} 1803 1803 #else 1804 1804 #define ALI5451_SPDIF(xname, xindex, value) \ … … 1925 1925 int err; 1926 1926 static ac97_bus_ops_t ops = { 1927 0,snd_ali_codec_write, 1927 0,0, 1928 snd_ali_codec_write, 1928 1929 snd_ali_codec_read,0,0 1929 1930 }; … … 2033 2034 if (codec->hw_initialized) 2034 2035 snd_ali_disable_address_interrupt(codec); 2035 if (codec->irq >= 0) {2036 // if (codec->irq >= 0) { // 12 Jun 07 SHL avoid warning 2036 2037 synchronize_irq(codec->irq); 2037 2038 free_irq(codec->irq, (void *)codec); 2038 }2039 // } // 12 Jun 07 SHL 2039 2040 if (codec->port) 2040 2041 pci_release_regions(codec->pci); -
GPL/trunk/alsa-kernel/pci/cmipci.c
r77 r135 1842 1842 0, 0, snd_cmipci_info_volume, \ 1843 1843 snd_cmipci_get_volume, snd_cmipci_put_volume, \ 1844 0,\ 1844 1845 COMPOSE_SB_REG(left_reg, right_reg, left_shift, right_shift, mask, invert, stereo), \ 1845 1846 } … … 1943 1944 0, 0, snd_cmipci_info_input_sw, \ 1944 1945 snd_cmipci_get_input_sw, snd_cmipci_put_input_sw, \ 1946 0, \ 1945 1947 COMPOSE_SB_REG(SB_DSP4_INPUT_LEFT, SB_DSP4_INPUT_RIGHT, left_shift, right_shift, 1, 0, 1), \ 1946 1948 } … … 2007 2009 0, 0, snd_cmipci_info_native_mixer, \ 2008 2010 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2011 0, \ 2009 2012 COMPOSE_SB_REG(reg, reg, lshift, rshift, 1, invert, 1), \ 2010 2013 } … … 2014 2017 0, 0, snd_cmipci_info_native_mixer, \ 2015 2018 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2019 0, \ 2016 2020 COMPOSE_SB_REG(reg, reg, shift, shift, 1, invert, 0), \ 2017 2021 } … … 2021 2025 0, 0, snd_cmipci_info_native_mixer, \ 2022 2026 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2027 0, \ 2023 2028 COMPOSE_SB_REG(reg, reg, lshift, rshift, mask, 0, 1), \ 2024 2029 } … … 2028 2033 0, 0, snd_cmipci_info_native_mixer, \ 2029 2034 snd_cmipci_get_native_mixer, snd_cmipci_put_native_mixer, \ 2035 0, \ 2030 2036 COMPOSE_SB_REG(reg, reg, shift, shift, mask, 0, 0), \ 2031 2037 } … … 2128 2134 snd_cmipci_get_native_mixer_sensitive, 2129 2135 snd_cmipci_put_native_mixer_sensitive, 2136 0, 2130 2137 COMPOSE_SB_REG(CM_REG_MIXER1, CM_REG_MIXER1, CM_WSMUTE_SHIFT, CM_WSMUTE_SHIFT, 1, 1, 0), 2131 2138 }, … … 2303 2310 snd_cmipci_uswitch_get, \ 2304 2311 snd_cmipci_uswitch_put, \ 2312 0, \ 2305 2313 (unsigned long)&cmipci_switch_arg_##sarg,\ 2306 2314 } -
GPL/trunk/alsa-kernel/pci/cs4281.c
r77 r135 1102 1102 static snd_kcontrol_new_t snd_cs4281_fm_vol = 1103 1103 { 1104 /* .iface = */SNDRV_CTL_ELEM_IFACE_MIXER,0,0,1105 /* .name = */"Synth Playback Volume",0,0,0,1106 /* .info = */snd_cs4281_info_volume,1107 /* .get = */snd_cs4281_get_volume,1108 /* .put = */snd_cs4281_put_volume,1109 /* .private_value = */((BA0_FMLVC << 16) | BA0_FMRVC),1104 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1105 .name = "Synth Playback Volume", 1106 .info = snd_cs4281_info_volume, 1107 .get = snd_cs4281_get_volume, 1108 .put = snd_cs4281_put_volume, 1109 .private_value = ((BA0_FMLVC << 16) | BA0_FMRVC) 1110 1110 }; 1111 1111 1112 1112 static snd_kcontrol_new_t snd_cs4281_pcm_vol = 1113 1113 { 1114 /* .iface = */SNDRV_CTL_ELEM_IFACE_MIXER,0,0,1115 /* .name = */"PCM Stream Playback Volume",0,0,0,1116 /* .info = */snd_cs4281_info_volume,1117 /* .get = */snd_cs4281_get_volume,1118 /* .put = */snd_cs4281_put_volume,1119 /* .private_value = */ ((BA0_PPLVC << 16) | BA0_PPRVC),1114 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1115 .name = "PCM Stream Playback Volume", 1116 .info = snd_cs4281_info_volume, 1117 .get = snd_cs4281_get_volume, 1118 .put = snd_cs4281_put_volume, 1119 .private_value = ((BA0_PPLVC << 16) | BA0_PPRVC) 1120 1120 }; 1121 1121 … … 1142 1142 int err; 1143 1143 static ac97_bus_ops_t ops = { 1144 0, 1144 0,0, 1145 1145 snd_cs4281_ac97_write, 1146 1146 snd_cs4281_ac97_read, … … 1935 1935 1936 1936 if (cmd & OPL3_RIGHT) 1937 port = ( unsigned long)chip->ba0 + BA0_B1AP; /* right port */1937 port = (void *)chip->ba0 + BA0_B1AP; /* right port */ 1938 1938 else 1939 port = ( unsigned long)chip->ba0 + BA0_B0AP; /* left port */1939 port = (void *)chip->ba0 + BA0_B0AP; /* left port */ 1940 1940 1941 1941 spin_lock_irqsave(&opl3->reg_lock, flags); -
GPL/trunk/alsa-kernel/pci/es1968.c
r77 r135 2041 2041 int err; 2042 2042 static ac97_bus_ops_t ops = { 2043 0, snd_es1968_ac97_write,2043 0, 0, snd_es1968_ac97_write, 2044 2044 snd_es1968_ac97_read,0,0 2045 2045 }; -
GPL/trunk/alsa-kernel/pci/fm801.c
r77 r135 1002 1002 { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, 0,0,0, snd_fm801_info_single, \ 1003 1003 snd_fm801_get_single, snd_fm801_put_single, \ 1004 reg | (shift << 8) | (mask << 16) | (invert << 24) }1004 0, reg | (shift << 8) | (mask << 16) | (invert << 24) } 1005 1005 1006 1006 static int snd_fm801_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1047 1047 { SNDRV_CTL_ELEM_IFACE_MIXER, 0,0, xname, 0,0,0, snd_fm801_info_double, \ 1048 1048 snd_fm801_get_double, snd_fm801_put_double, \ 1049 reg | (shift_left << 8) | (shift_right << 12) | (mask << 16) | (invert << 24) }1049 0, reg | (shift_left << 8) | (shift_right << 12) | (mask << 16) | (invert << 24) } 1050 1050 1051 1051 static int snd_fm801_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) … … 1189 1189 int err; 1190 1190 static ac97_bus_ops_t ops = { 1191 0, snd_fm801_codec_write,1191 0, 0, snd_fm801_codec_write, 1192 1192 snd_fm801_codec_read, 0,0 1193 1193 }; -
GPL/trunk/alsa-kernel/pci/intel8x0.c
r88 r135 3238 3238 } 3239 3239 3240 #if 0 // fixme to be gone? 3240 3241 static void __devexit snd_intel8x0_joystick_remove(struct pci_dev *pci) 3241 3242 { … … 3253 3254 pci_write_config_word(pci, 0xe6, val); 3254 3255 } 3256 #endif // fixme to be gone 3255 3257 3256 3258 static struct pci_device_id snd_intel8x0_joystick_ids[] = { -
GPL/trunk/alsa-kernel/pci/maestro3.c
r77 r135 2126 2126 int err; 2127 2127 static ac97_bus_ops_t ops = { 2128 0,snd_m3_ac97_write,2129 snd_m3_ac97_read,0,02128 .write = snd_m3_ac97_write, 2129 .read = snd_m3_ac97_read 2130 2130 }; 2131 2131 -
GPL/trunk/alsa-kernel/pci/trident/trident.c
r77 r135 78 78 MODULE_DEVICE_TABLE(pci, snd_trident_ids); 79 79 80 // 12 Jun 07 SHL fixme to be in some .h 81 void __devinit snd_trident_gameport(struct snd_trident *chip); 82 80 83 static int __devinit snd_trident_probe(struct pci_dev *pci, 81 84 const struct pci_device_id *pci_id) -
GPL/trunk/alsa-kernel/pci/trident/trident_main.c
r84 r135 145 145 146 146 /*--------------------------------------------------------------------------- 147 void snd_trident_codec_write(ac97_t *ac97, unsigned short reg, unsigned short wdata )147 void snd_trident_codec_write(ac97_t *ac97, unsigned short reg, unsigned short wdata unsigned short unused) 148 148 149 149 Description: This routine will do all of the writing to the external … … 2355 2355 snd_trident_spdif_control_get, 2356 2356 snd_trident_spdif_control_put, 2357 0, 2357 2358 0x28, 2358 2359 }; … … 2567 2568 snd_trident_ac97_control_get, 2568 2569 snd_trident_ac97_control_put, 2570 0, 2569 2571 4, 2570 2572 }; … … 2623 2625 snd_trident_vol_control_get, 2624 2626 snd_trident_vol_control_put, 2625 16, 2627 0, // tlv 2628 16 // private 2626 2629 }; 2627 2630 … … 2940 2943 int idx, err, retries = 2; 2941 2944 static ac97_bus_ops_t ops = { 2942 0,snd_trident_codec_write, 2943 snd_trident_codec_read,0,0 2945 0, // reset 2946 0, // warm_reset 2947 snd_trident_codec_write, 2948 snd_trident_codec_read, 2949 0, // wait 2950 0 // init 2944 2951 }; 2945 2952 uctl = kcalloc(1, sizeof(*uctl), GFP_KERNEL); -
GPL/trunk/alsa-kernel/pci/via82xx.c
r85 r135 618 618 * Used for 686 and 8233A 619 619 */ 620 static irqreturn_t snd_via686_interrupt(int irq, void *dev_id )620 static irqreturn_t snd_via686_interrupt(int irq, void *dev_id, struct pt_regs *unused) 621 621 { 622 622 struct via82xx *chip = dev_id; … … 664 664 * Interrupt handler 665 665 */ 666 static irqreturn_t snd_via8233_interrupt(int irq, void *dev_id )666 static irqreturn_t snd_via8233_interrupt(int irq, void *dev_id,struct pt_regs *unused) 667 667 { 668 668 struct via82xx *chip = dev_id; … … 2311 2311 if (request_irq(pci->irq, 2312 2312 chip_type == TYPE_VIA8233 ? 2313 snd_via8233_interrupt :snd_via686_interrupt,2313 snd_via8233_interrupt : snd_via686_interrupt, 2314 2314 SA_INTERRUPT|SA_SHIRQ, 2315 2315 card->driver, chip)) { -
GPL/trunk/alsa-kernel/synth/emux/soundfont.c
r77 r135 142 142 143 143 count -= sizeof(patch); 144 (char*)data +=sizeof(patch);144 data = (char*)data + sizeof(patch); 145 145 146 146 if (patch.key != SNDRV_OSS_SOUNDFONT_PATCH) { … … 539 539 return -EFAULT; 540 540 541 (char*)data +=sizeof(hdr);541 data = (char*)data + sizeof(hdr); 542 542 count -= sizeof(hdr); 543 543 544 if ( hdr.nvoices <= 0 || hdr.nvoices >= 100) {544 if ((signed char)hdr.nvoices <= 0 || hdr.nvoices >= 100) { 545 545 printk("Soundfont error: Illegal voice number %d\n", hdr.nvoices); 546 546 return -EINVAL; … … 578 578 } 579 579 580 (char*)data +=sizeof(tmpzone.v);580 data = (char*)data + sizeof(tmpzone.v); 581 581 count -= sizeof(tmpzone.v); 582 582
Note:
See TracChangeset
for help on using the changeset viewer.