Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa

* master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
[ALSA] Don't reject O_RDWR at opening PCM OSS with read/write-only device
[ALSA] snd-emu10k1: Implement support for Audigy 2 ZS [SB0353]
[ALSA] add MAINTAINERS entry for snd-aoa
[ALSA] aoa: platform function gpio: ignore errors from functions that don't exist
[ALSA] make snd-powermac load even when it can't bind the device
[ALSA] aoa: fix toonie codec
[ALSA] aoa: feature gpio layer: fix IRQ access
[ALSA] Conversions from kmalloc+memset to k(z|c)alloc
[ALSA] snd-emu10k1: Fixes ALSA bug#2190

+62 -47
+7
MAINTAINERS
··· 298 298 W: http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html 299 299 S: Supported 300 300 301 + AOA (Apple Onboard Audio) ALSA DRIVER 302 + P: Johannes Berg 303 + M: johannes@sipsolutions.net 304 + L: linuxppc-dev@ozlabs.org 305 + L: alsa-devel@alsa-project.org 306 + S: Maintained 307 + 301 308 APM DRIVER 302 309 P: Stephen Rothwell 303 310 M: sfr@canb.auug.org.au
+13 -4
sound/aoa/codecs/snd-aoa-codec-toonie.c
··· 51 51 {} 52 52 }; 53 53 54 + static int toonie_usable(struct codec_info_item *cii, 55 + struct transfer_info *ti, 56 + struct transfer_info *out) 57 + { 58 + return 1; 59 + } 60 + 54 61 #ifdef CONFIG_PM 55 62 static int toonie_suspend(struct codec_info_item *cii, pm_message_t state) 56 63 { ··· 76 69 .sysclock_factor = 256, 77 70 .bus_factor = 64, 78 71 .owner = THIS_MODULE, 72 + .usable = toonie_usable, 79 73 #ifdef CONFIG_PM 80 74 .suspend = toonie_suspend, 81 75 .resume = toonie_resume, ··· 87 79 { 88 80 struct toonie *toonie = codec_to_toonie(codec); 89 81 82 + /* nothing connected? what a joke! */ 83 + if (toonie->codec.connected != 1) 84 + return -ENOTCONN; 85 + 90 86 if (aoa_snd_device_new(SNDRV_DEV_LOWLEVEL, toonie, &ops)) { 91 87 printk(KERN_ERR PFX "failed to create toonie snd device!\n"); 92 88 return -ENODEV; 93 89 } 94 90 95 - /* nothing connected? what a joke! */ 96 - if (toonie->codec.connected != 1) 97 - return -ENOTCONN; 98 - 99 91 if (toonie->codec.soundbus_dev->attach_codec(toonie->codec.soundbus_dev, 100 92 aoa_get_card(), 101 93 &toonie_codec_info, toonie)) { 102 94 printk(KERN_ERR PFX "error creating toonie pcm\n"); 95 + snd_device_free(aoa_get_card(), toonie); 103 96 return -ENODEV; 104 97 } 105 98
+5 -2
sound/aoa/core/snd-aoa-gpio-feature.c
··· 112 112 113 113 static void get_irq(struct device_node * np, int *irqptr) 114 114 { 115 - *irqptr = irq_of_parse_and_map(np, 0); 115 + if (np) 116 + *irqptr = irq_of_parse_and_map(np, 0); 117 + else 118 + *irqptr = NO_IRQ; 116 119 } 117 120 118 121 /* 0x4 is outenable, 0x1 is out, thus 4 or 5 */ ··· 325 322 return -EINVAL; 326 323 } 327 324 328 - if (irq == -1) 325 + if (irq == NO_IRQ) 329 326 return -ENODEV; 330 327 331 328 mutex_lock(&notif->mutex);
+1 -1
sound/aoa/core/snd-aoa-gpio-pmf.c
··· 18 18 \ 19 19 if (unlikely(!rt)) return; \ 20 20 rc = pmf_call_function(rt->node, #name "-mute", &args); \ 21 - if (rc) \ 21 + if (rc && rc != -ENODEV) \ 22 22 printk(KERN_WARNING "pmf_gpio_set_" #name \ 23 23 " failed, rc: %d\n", rc); \ 24 24 rt->implementation_private &= ~(1<<bit); \
+1 -2
sound/core/oss/mixer_oss.c
··· 988 988 if (ptr->index == 0 && (kctl = snd_mixer_oss_test_id(mixer, "Capture Source", 0)) != NULL) { 989 989 struct snd_ctl_elem_info *uinfo; 990 990 991 - uinfo = kmalloc(sizeof(*uinfo), GFP_KERNEL); 991 + uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL); 992 992 if (! uinfo) { 993 993 up_read(&mixer->card->controls_rwsem); 994 994 return -ENOMEM; 995 995 } 996 996 997 - memset(uinfo, 0, sizeof(*uinfo)); 998 997 if (kctl->info(kctl, uinfo)) { 999 998 up_read(&mixer->card->controls_rwsem); 1000 999 return 0;
+2
sound/core/oss/pcm_oss.c
··· 2228 2228 for (idx = 0; idx < 2; idx++) { 2229 2229 if (setup[idx].disable) 2230 2230 continue; 2231 + if (! pcm->streams[idx].substream_count) 2232 + continue; /* no matching substream */ 2231 2233 if (idx == SNDRV_PCM_STREAM_PLAYBACK) { 2232 2234 if (! (f_mode & FMODE_WRITE)) 2233 2235 continue;
+1 -2
sound/core/seq/seq_device.c
··· 372 372 { 373 373 struct ops_list *ops; 374 374 375 - ops = kmalloc(sizeof(*ops), GFP_KERNEL); 375 + ops = kzalloc(sizeof(*ops), GFP_KERNEL); 376 376 if (ops == NULL) 377 377 return ops; 378 - memset(ops, 0, sizeof(*ops)); 379 378 380 379 /* set up driver entry */ 381 380 strlcpy(ops->id, id, sizeof(ops->id));
+3 -6
sound/core/sgbuf.c
··· 68 68 69 69 dmab->area = NULL; 70 70 dmab->addr = 0; 71 - dmab->private_data = sgbuf = kmalloc(sizeof(*sgbuf), GFP_KERNEL); 71 + dmab->private_data = sgbuf = kzalloc(sizeof(*sgbuf), GFP_KERNEL); 72 72 if (! sgbuf) 73 73 return NULL; 74 - memset(sgbuf, 0, sizeof(*sgbuf)); 75 74 sgbuf->dev = device; 76 75 pages = snd_sgbuf_aligned_pages(size); 77 76 sgbuf->tblsize = sgbuf_align_table(pages); 78 - sgbuf->table = kmalloc(sizeof(*sgbuf->table) * sgbuf->tblsize, GFP_KERNEL); 77 + sgbuf->table = kcalloc(sgbuf->tblsize, sizeof(*sgbuf->table), GFP_KERNEL); 79 78 if (! sgbuf->table) 80 79 goto _failed; 81 - memset(sgbuf->table, 0, sizeof(*sgbuf->table) * sgbuf->tblsize); 82 - sgbuf->page_table = kmalloc(sizeof(*sgbuf->page_table) * sgbuf->tblsize, GFP_KERNEL); 80 + sgbuf->page_table = kcalloc(sgbuf->tblsize, sizeof(*sgbuf->page_table), GFP_KERNEL); 83 81 if (! sgbuf->page_table) 84 82 goto _failed; 85 - memset(sgbuf->page_table, 0, sizeof(*sgbuf->page_table) * sgbuf->tblsize); 86 83 87 84 /* allocate each page */ 88 85 for (i = 0; i < pages; i++) {
+2 -5
sound/drivers/vx/vx_pcm.c
··· 1252 1252 chip->audio_info = rmh.Stat[1]; 1253 1253 1254 1254 /* allocate pipes */ 1255 - chip->playback_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_outs, GFP_KERNEL); 1255 + chip->playback_pipes = kcalloc(chip->audio_outs, sizeof(struct vx_pipe *), GFP_KERNEL); 1256 1256 if (!chip->playback_pipes) 1257 1257 return -ENOMEM; 1258 - chip->capture_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_ins, GFP_KERNEL); 1258 + chip->capture_pipes = kcalloc(chip->audio_ins, sizeof(struct vx_pipe *), GFP_KERNEL); 1259 1259 if (!chip->capture_pipes) { 1260 1260 kfree(chip->playback_pipes); 1261 1261 return -ENOMEM; 1262 1262 } 1263 - 1264 - memset(chip->playback_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_outs); 1265 - memset(chip->capture_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_ins); 1266 1263 1267 1264 preferred = chip->ibl.size; 1268 1265 chip->ibl.size = 0;
+2 -2
sound/pci/echoaudio/echoaudio.c
··· 236 236 chip = snd_pcm_substream_chip(substream); 237 237 runtime = substream->runtime; 238 238 239 - if (!(pipe = kmalloc(sizeof(struct audiopipe), GFP_KERNEL))) 239 + pipe = kzalloc(sizeof(struct audiopipe), GFP_KERNEL); 240 + if (!pipe) 240 241 return -ENOMEM; 241 - memset(pipe, 0, sizeof(struct audiopipe)); 242 242 pipe->index = -1; /* Not configured yet */ 243 243 244 244 /* Set up hw capabilities and contraints */
+11
sound/pci/emu10k1/emu10k1_main.c
··· 936 936 .ca0151_chip = 1, 937 937 .spk71 = 1, 938 938 .spdif_bug = 1} , 939 + /* Dell OEM/Creative Labs Audigy 2 ZS */ 940 + /* See ALSA bug#1365 */ 941 + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10031102, 942 + .driver = "Audigy2", .name = "Audigy 2 ZS [SB0353]", 943 + .id = "Audigy2", 944 + .emu10k2_chip = 1, 945 + .ca0102_chip = 1, 946 + .ca0151_chip = 1, 947 + .spk71 = 1, 948 + .spdif_bug = 1, 949 + .ac97_chip = 1} , 939 950 {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102, 940 951 .driver = "Audigy2", .name = "Audigy 2 Platinum [SB0240P]", 941 952 .id = "Audigy2",
+5 -1
sound/pci/emu10k1/irq.c
··· 37 37 int handled = 0; 38 38 39 39 while ((status = inl(emu->port + IPR)) != 0) { 40 - //printk("emu10k1 irq - status = 0x%x\n", status); 40 + //snd_printk(KERN_INFO "emu10k1 irq - status = 0x%x\n", status); 41 41 orig_status = status; 42 42 handled = 1; 43 + if ((status & 0xffffffff) == 0xffffffff) { 44 + snd_printk(KERN_INFO "snd-emu10k1: Suspected sound card removal\n"); 45 + break; 46 + } 43 47 if (status & IPR_PCIERROR) { 44 48 snd_printk(KERN_ERR "interrupt: PCI error\n"); 45 49 snd_emu10k1_intr_disable(emu, INTE_PCIERRORENABLE);
+1 -2
sound/ppc/awacs.c
··· 801 801 chip->revision = (in_le32(&chip->awacs->codec_stat) >> 12) & 0xf; 802 802 #ifdef PMAC_AMP_AVAIL 803 803 if (chip->revision == 3 && chip->has_iic && CHECK_CUDA_AMP()) { 804 - struct awacs_amp *amp = kmalloc(sizeof(*amp), GFP_KERNEL); 804 + struct awacs_amp *amp = kzalloc(sizeof(*amp), GFP_KERNEL); 805 805 if (! amp) 806 806 return -ENOMEM; 807 807 chip->mixer_data = amp; 808 - memset(amp, 0, sizeof(*amp)); 809 808 chip->mixer_free = awacs_amp_free; 810 809 awacs_amp_set_vol(amp, 0, 63, 63, 0); /* mute and zero vol */ 811 810 awacs_amp_set_vol(amp, 1, 63, 63, 0);
+1 -2
sound/ppc/daca.c
··· 258 258 request_module("i2c-powermac"); 259 259 #endif /* CONFIG_KMOD */ 260 260 261 - mix = kmalloc(sizeof(*mix), GFP_KERNEL); 261 + mix = kzalloc(sizeof(*mix), GFP_KERNEL); 262 262 if (! mix) 263 263 return -ENOMEM; 264 - memset(mix, 0, sizeof(*mix)); 265 264 chip->mixer_data = mix; 266 265 chip->mixer_free = daca_cleanup; 267 266 mix->amp_on = 1; /* default on */
+1 -2
sound/ppc/keywest.c
··· 64 64 if (strncmp(i2c_device_name(adapter), "mac-io", 6)) 65 65 return 0; /* ignored */ 66 66 67 - new_client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); 67 + new_client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); 68 68 if (! new_client) 69 69 return -ENOMEM; 70 70 71 - memset(new_client, 0, sizeof(*new_client)); 72 71 new_client->addr = keywest_ctx->addr; 73 72 i2c_set_clientdata(new_client, keywest_ctx); 74 73 new_client->adapter = adapter;
+3 -10
sound/ppc/powermac.c
··· 181 181 if ((err = platform_driver_register(&snd_pmac_driver)) < 0) 182 182 return err; 183 183 device = platform_device_register_simple(SND_PMAC_DRIVER, -1, NULL, 0); 184 - if (!IS_ERR(device)) { 185 - if (platform_get_drvdata(device)) 186 - return 0; 187 - platform_device_unregister(device); 188 - err = -ENODEV; 189 - } else 190 - err = PTR_ERR(device); 191 - platform_driver_unregister(&snd_pmac_driver); 192 - return err; 184 + return 0; 193 185 194 186 } 195 187 196 188 static void __exit alsa_card_pmac_exit(void) 197 189 { 198 - platform_device_unregister(device); 190 + if (!IS_ERR(device)) 191 + platform_device_unregister(device); 199 192 platform_driver_unregister(&snd_pmac_driver); 200 193 } 201 194
+1 -2
sound/ppc/tumbler.c
··· 1316 1316 request_module("i2c-powermac"); 1317 1317 #endif /* CONFIG_KMOD */ 1318 1318 1319 - mix = kmalloc(sizeof(*mix), GFP_KERNEL); 1319 + mix = kzalloc(sizeof(*mix), GFP_KERNEL); 1320 1320 if (! mix) 1321 1321 return -ENOMEM; 1322 - memset(mix, 0, sizeof(*mix)); 1323 1322 mix->headphone_irq = -1; 1324 1323 1325 1324 chip->mixer_data = mix;
+2 -4
sound/usb/usbaudio.c
··· 2260 2260 } 2261 2261 2262 2262 /* create a new pcm */ 2263 - as = kmalloc(sizeof(*as), GFP_KERNEL); 2263 + as = kzalloc(sizeof(*as), GFP_KERNEL); 2264 2264 if (! as) 2265 2265 return -ENOMEM; 2266 - memset(as, 0, sizeof(*as)); 2267 2266 as->pcm_index = chip->pcm_devs; 2268 2267 as->chip = chip; 2269 2268 as->fmt_type = fp->fmt_type; ··· 2632 2633 csep = NULL; 2633 2634 } 2634 2635 2635 - fp = kmalloc(sizeof(*fp), GFP_KERNEL); 2636 + fp = kzalloc(sizeof(*fp), GFP_KERNEL); 2636 2637 if (! fp) { 2637 2638 snd_printk(KERN_ERR "cannot malloc\n"); 2638 2639 return -ENOMEM; 2639 2640 } 2640 2641 2641 - memset(fp, 0, sizeof(*fp)); 2642 2642 fp->iface = iface_no; 2643 2643 fp->altsetting = altno; 2644 2644 fp->altset_idx = i;