Changeset 736
- Timestamp:
- Sep 18, 2022, 2:46:55 AM (3 years ago)
- Location:
- GPL/branches/uniaud32-exp
- Files:
-
- 2 added
- 59 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-exp/alsa-kernel/core/control.c
r732 r736 130 130 control->vd[idx].owner = NULL; 131 131 up_write(&card->controls_rwsem); 132 snd_fasync_free(ctl->fasync);133 132 snd_ctl_empty_read_queue(ctl); 134 133 put_pid(ctl->pid); … … 185 184 wake_up(&ctl->change_sleep); 186 185 spin_unlock(&ctl->read_lock); 187 snd_kill_fasync(ctl->fasync, SIGIO, POLL_IN);186 kill_fasync(&ctl->fasync, SIGIO, POLL_IN); 188 187 } 189 188 read_unlock_irqrestore(&card->ctl_files_rwlock, flags); … … 2016 2015 2017 2016 ctl = file->private_data; 2018 return snd_fasync_helper(fd, file, on, &ctl->fasync);2017 return fasync_helper(fd, file, on, &ctl->fasync); 2019 2018 } 2020 2019 … … 2184 2183 list_for_each_entry(ctl, &card->ctl_files, list, struct snd_ctl_file) { 2185 2184 wake_up(&ctl->change_sleep); 2186 snd_kill_fasync(ctl->fasync, SIGIO, POLL_ERR);2185 kill_fasync(&ctl->fasync, SIGIO, POLL_ERR); 2187 2186 } 2188 2187 read_unlock_irqrestore(&card->ctl_files_rwlock, flags); -
GPL/branches/uniaud32-exp/alsa-kernel/core/info.c
r725 r736 113 113 mutex_lock(&entry->access); 114 114 if (entry->c.ops->llseek) { 115 ret = entry->c.ops->llseek(entry,116 data->file_private_data,117 file, offset, orig);115 offset = entry->c.ops->llseek(entry, 116 data->file_private_data, 117 file, offset, orig); 118 118 goto out; 119 119 } -
GPL/branches/uniaud32-exp/alsa-kernel/core/init.c
r732 r736 214 214 * is added automatically. In that way, the resource disconnection is assured 215 215 * at first, then released in the expected order. 216 *217 * If an error happens at the probe before snd_card_register() is called and218 * there have been other devres resources, you'd need to free the card manually219 * via snd_card_free() call in the error; otherwise it may lead to UAF due to220 * devres call orders. You can use snd_card_free_on_error() helper for221 * handling it more easily.222 216 */ 223 217 int snd_devm_card_new(struct device *parent, int idx, const char *xid, … … 245 239 } 246 240 EXPORT_SYMBOL_GPL(snd_devm_card_new); 247 248 /**249 * snd_card_free_on_error - a small helper for handling devm probe errors250 * @dev: the managed device object251 * @ret: the return code from the probe callback252 *253 * This function handles the explicit snd_card_free() call at the error from254 * the probe callback. It's just a small helper for simplifying the error255 * handling with the managed devices.256 */257 int snd_card_free_on_error(struct device *dev, int ret)258 {259 struct snd_card *card;260 261 if (!ret)262 return 0;263 card = devres_find(dev, __snd_card_release, NULL, NULL);264 if (card)265 snd_card_free(card);266 return ret;267 }268 EXPORT_SYMBOL_GPL(snd_card_free_on_error);269 241 270 242 static int snd_card_init(struct snd_card *card, struct device *parent, -
GPL/branches/uniaud32-exp/alsa-kernel/core/jack.c
r711 r736 43 43 struct snd_jack *jack = device->device_data; 44 44 45 mutex_lock(&jack->input_dev_lock); 46 if (!jack->input_dev) { 47 mutex_unlock(&jack->input_dev_lock); 45 if (!jack->input_dev) 48 46 return 0; 49 }50 47 51 48 /* If the input device is registered with the input subsystem … … 56 53 input_free_device(jack->input_dev); 57 54 jack->input_dev = NULL; 58 mutex_unlock(&jack->input_dev_lock);59 55 #endif /* CONFIG_SND_JACK_INPUT_DEV */ 60 56 return 0; … … 95 91 card->shortname, jack->id); 96 92 97 mutex_lock(&jack->input_dev_lock); 98 if (!jack->input_dev) { 99 mutex_unlock(&jack->input_dev_lock); 93 if (!jack->input_dev) 100 94 return 0; 101 }102 95 103 96 jack->input_dev->name = jack->name; … … 124 117 jack->registered = 1; 125 118 126 mutex_unlock(&jack->input_dev_lock);127 119 return err; 128 120 } … … 526 518 } 527 519 528 #ifdef CONFIG_SND_JACK_INPUT_DEV 529 mutex_init(&jack->input_dev_lock); 530 531 /* don't create input device for phantom jack */ 520 /* don't creat input device for phantom jack */ 532 521 if (!phantom_jack) { 522 #ifdef CONFIG_SND_JACK_INPUT_DEV 533 523 int i; 534 524 … … 548 538 jack_switch_types[i]); 549 539 550 } 551 #endif /* CONFIG_SND_JACK_INPUT_DEV */ 540 #endif /* CONFIG_SND_JACK_INPUT_DEV */ 541 } 552 542 553 543 err = snd_device_new(card, SNDRV_DEV_JACK, jack, &ops); … … 589 579 { 590 580 WARN_ON(jack->registered); 591 mutex_lock(&jack->input_dev_lock); 592 if (!jack->input_dev) { 593 mutex_unlock(&jack->input_dev_lock); 581 if (!jack->input_dev) 594 582 return; 595 }596 583 597 584 jack->input_dev->dev.parent = parent; 598 mutex_unlock(&jack->input_dev_lock);599 585 } 600 586 EXPORT_SYMBOL(snd_jack_set_parent); … … 644 630 /** 645 631 * snd_jack_report - Report the current status of a jack 646 * Note: This function uses mutexes and should be called from a647 * context which can sleep (such as a workqueue).648 632 * 649 633 * @jack: The jack to report status for … … 671 655 672 656 #ifdef CONFIG_SND_JACK_INPUT_DEV 673 mutex_lock(&jack->input_dev_lock); 674 if (!jack->input_dev) { 675 mutex_unlock(&jack->input_dev_lock); 657 if (!jack->input_dev) 676 658 return; 677 }678 659 679 660 for (i = 0; i < ARRAY_SIZE(jack->key); i++) { … … 695 676 696 677 input_sync(jack->input_dev); 697 mutex_unlock(&jack->input_dev_lock);698 678 #endif /* CONFIG_SND_JACK_INPUT_DEV */ 699 679 } -
GPL/branches/uniaud32-exp/alsa-kernel/core/memalloc.c
r722 r736 14 14 #include <linux/dma-mapping.h> 15 15 #include <linux/genalloc.h> 16 #include <linux/highmem.h> 16 17 #include <linux/vmalloc.h> 17 18 #ifdef CONFIG_X86 … … 20 21 #include <sound/memalloc.h> 21 22 #include "memalloc_local.h" 23 24 static const struct snd_malloc_ops *snd_dma_get_ops(struct snd_dma_buffer *dmab); 22 25 23 26 /* … … 148 151 149 152 /** 150 * snd_dma_alloc_pages - allocate the buffer area according to the given type 153 * snd_dma_alloc_dir_pages - allocate the buffer area according to the given 154 * type and direction 151 155 * @type: the DMA buffer type 152 156 * @device: the device pointer 157 * @dir: DMA direction 153 158 * @size: the buffer size to allocate 154 159 * @dmab: buffer allocation record to store the allocated data … … 160 165 * otherwise a negative value on error. 161 166 */ 162 int snd_dma_alloc_pages(int type, struct device *device, size_t size, 163 struct snd_dma_buffer *dmab) 167 int snd_dma_alloc_dir_pages(int type, struct device *device, 168 enum dma_data_direction dir, size_t size, 169 struct snd_dma_buffer *dmab) 164 170 { 165 171 gfp_t gfp; … … 173 179 dmab->dev.type = type; 174 180 dmab->dev.dev = device; 181 dmab->dev.dir = dir; 175 182 dmab->bytes = 0; 176 183 dmab->area = NULL; … … 224 231 return 0; 225 232 } 226 EXPORT_SYMBOL(snd_dma_alloc_ pages);233 EXPORT_SYMBOL(snd_dma_alloc_dir_pages); 227 234 228 235 /** … … 342 349 343 350 /** 344 * snd_devm_alloc_ pages - allocate the buffer and manage with devres351 * snd_devm_alloc_dir_pages - allocate the buffer and manage with devres 345 352 * @dev: the device pointer 346 353 * @type: the DMA buffer type 354 * @dir: DMA direction 347 355 * @size: the buffer size to allocate 348 356 * … … 357 365 */ 358 366 struct snd_dma_buffer * 359 snd_devm_alloc_pages(struct device *dev, int type, size_t size) 367 snd_devm_alloc_dir_pages(struct device *dev, int type, 368 enum dma_data_direction dir, size_t size) 360 369 { 361 370 struct snd_dma_buffer *dmab; … … 370 379 return NULL; 371 380 372 err = snd_dma_alloc_ pages(type, dev, size, dmab);381 err = snd_dma_alloc_dir_pages(type, dev, dir, size, dmab); 373 382 if (err < 0) { 374 383 devres_free(dmab); … … 379 388 return dmab; 380 389 } 381 EXPORT_SYMBOL_GPL(snd_devm_alloc_pages); 390 EXPORT_SYMBOL_GPL(snd_devm_alloc_dir_pages); 391 -
GPL/branches/uniaud32-exp/alsa-kernel/core/memalloc_local.h
r710 r736 11 11 unsigned int ofs, unsigned int size); 12 12 int (*mmap)(struct snd_dma_buffer *dmab, struct vm_area_struct *area); 13 void (*sync)(struct snd_dma_buffer *dmab, enum snd_dma_sync_mode mode); 13 14 }; 14 15 -
GPL/branches/uniaud32-exp/alsa-kernel/core/misc.c
r725 r736 11 11 #include <linux/slab.h> 12 12 #include <linux/ioport.h> 13 #include <linux/fs.h>14 13 #include <sound/core.h> 15 14 … … 147 146 EXPORT_SYMBOL(snd_pci_quirk_lookup); 148 147 #endif 149 150 /*151 * Deferred async signal helpers152 *153 * Below are a few helper functions to wrap the async signal handling154 * in the deferred work. The main purpose is to avoid the messy deadlock155 * around tasklist_lock and co at the kill_fasync() invocation.156 * fasync_helper() and kill_fasync() are replaced with snd_fasync_helper()157 * and snd_kill_fasync(), respectively. In addition, snd_fasync_free() has158 * to be called at releasing the relevant file object.159 */160 struct snd_fasync {161 struct fasync_struct *fasync;162 int signal;163 int poll;164 int on;165 struct list_head list;166 };167 168 static DEFINE_SPINLOCK(snd_fasync_lock);169 static LIST_HEAD(snd_fasync_list);170 171 static void snd_fasync_work_fn(struct work_struct *work)172 {173 struct snd_fasync *fasync;174 175 spin_lock_irq(&snd_fasync_lock);176 while (!list_empty(&snd_fasync_list)) {177 fasync = list_first_entry(&snd_fasync_list, struct snd_fasync, list);178 list_del_init(&fasync->list);179 spin_unlock_irq(&snd_fasync_lock);180 if (fasync->on)181 kill_fasync(&fasync->fasync, fasync->signal, fasync->poll);182 spin_lock_irq(&snd_fasync_lock);183 }184 spin_unlock_irq(&snd_fasync_lock);185 }186 187 static DECLARE_WORK(snd_fasync_work, snd_fasync_work_fn);188 189 int snd_fasync_helper(int fd, struct file *file, int on,190 struct snd_fasync **fasyncp)191 {192 struct snd_fasync *fasync = NULL;193 194 if (on) {195 fasync = kzalloc(sizeof(*fasync), GFP_KERNEL);196 if (!fasync)197 return -ENOMEM;198 INIT_LIST_HEAD(&fasync->list);199 }200 201 spin_lock_irq(&snd_fasync_lock);202 if (*fasyncp) {203 kfree(fasync);204 fasync = *fasyncp;205 } else {206 if (!fasync) {207 spin_unlock_irq(&snd_fasync_lock);208 return 0;209 }210 *fasyncp = fasync;211 }212 fasync->on = on;213 spin_unlock_irq(&snd_fasync_lock);214 return fasync_helper(fd, file, on, &fasync->fasync);215 }216 EXPORT_SYMBOL_GPL(snd_fasync_helper);217 218 void snd_kill_fasync(struct snd_fasync *fasync, int signal, int poll)219 {220 unsigned long flags;221 222 if (!fasync || !fasync->on)223 return;224 spin_lock_irqsave(&snd_fasync_lock, flags);225 fasync->signal = signal;226 fasync->poll = poll;227 list_move(&fasync->list, &snd_fasync_list);228 schedule_work(&snd_fasync_work);229 spin_unlock_irqrestore(&snd_fasync_lock, flags);230 }231 EXPORT_SYMBOL_GPL(snd_kill_fasync);232 233 void snd_fasync_free(struct snd_fasync *fasync)234 {235 if (!fasync)236 return;237 fasync->on = 0;238 flush_work(&snd_fasync_work);239 kfree(fasync);240 }241 EXPORT_SYMBOL_GPL(snd_fasync_free); -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_lib.c
r711 r736 120 120 ofs = 0; 121 121 } 122 #ifndef TARGET_OS2 123 snd_pcm_dma_buffer_sync(substream, SNDRV_DMA_SYNC_DEVICE); 124 #endif 122 125 } 123 126 … … 2310 2313 #endif 2311 2314 snd_pcm_stream_unlock_irq(substream); 2315 #ifndef TARGET_OS2 2316 if (!is_playback) 2317 snd_pcm_dma_buffer_sync(substream, SNDRV_DMA_SYNC_CPU); 2318 #endif 2312 2319 err = writer(substream, appl_ofs, data, offset, frames, 2313 2320 transfer); 2321 #ifndef TARGET_OS2 2322 if (is_playback) 2323 snd_pcm_dma_buffer_sync(substream, SNDRV_DMA_SYNC_DEVICE); 2324 #endif 2314 2325 snd_pcm_stream_lock_irq(substream); 2315 2326 #ifndef TARGET_OS2 -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_local.h
r697 r736 74 74 (subs) = (subs)->next) 75 75 76 static inline void snd_pcm_dma_buffer_sync(struct snd_pcm_substream *substream, 77 enum snd_dma_sync_mode mode) 78 { 79 if (substream->runtime->info & SNDRV_PCM_INFO_EXPLICIT_SYNC) 80 snd_dma_buffer_sync(snd_pcm_get_dma_buf(substream), mode); 81 } 82 76 83 #endif /* __SOUND_CORE_PCM_LOCAL_H */ -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_memory.c
r733 r736 33 33 34 34 static int do_alloc_pages(struct snd_card *card, int type, struct device *dev, 35 size_t size, struct snd_dma_buffer *dmab) 36 { 35 int str, size_t size, struct snd_dma_buffer *dmab) 36 { 37 enum dma_data_direction dir; 37 38 int err; 38 39 … … 41 42 return -ENOMEM; 42 43 43 err = snd_dma_alloc_pages(type, dev, size, dmab); 44 if (str == SNDRV_PCM_STREAM_PLAYBACK) 45 dir = DMA_TO_DEVICE; 46 else 47 dir = DMA_FROM_DEVICE; 48 err = snd_dma_alloc_dir_pages(type, dev, dir, size, dmab); 44 49 if (!err) { 45 50 mutex_lock(&card->memory_mutex); … … 78 83 do { 79 84 err = do_alloc_pages(card, dmab->dev.type, dmab->dev.dev, 80 s ize, dmab);85 substream->stream, size, dmab); 81 86 if (err != -ENOMEM) 82 87 return err; … … 183 188 substream->dma_buffer.dev.type, 184 189 substream->dma_buffer.dev.dev, 190 substream->stream, 185 191 size, &new_dmab) < 0) { 186 192 buffer->error = -ENOMEM; … … 430 436 substream->dma_buffer.dev.type, 431 437 substream->dma_buffer.dev.dev, 438 substream->stream, 432 439 size, dmab) < 0) { 433 440 kfree(dmab); … … 459 466 int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream) 460 467 { 468 struct snd_card *card = substream->pcm->card; 461 469 struct snd_pcm_runtime *runtime; 462 470 … … 467 475 return 0; 468 476 if (runtime->dma_buffer_p != &substream->dma_buffer) { 469 struct snd_card *card = substream->pcm->card;470 471 477 /* it's a newly allocated buffer. release it now. */ 472 478 do_free_pages(card, runtime->dma_buffer_p); -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_misc.c
r711 r736 434 434 width = pcm_formats[(INT)format].phys; /* physical width */ 435 435 pat = pcm_formats[(INT)format].silence; 436 if (! width || !pat)436 if (! width) 437 437 return -EINVAL; 438 438 /* signed or 1 byte data */ -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_native.c
r713 r736 2773 2773 } 2774 2774 2775 /* automatically set EXPLICIT_SYNC flag in the managed mode whenever 2776 * the DMA buffer requires it 2777 */ 2778 if (substream->managed_buffer_alloc && 2779 substream->dma_buffer.dev.need_sync) 2780 substream->runtime->hw.info |= SNDRV_PCM_INFO_EXPLICIT_SYNC; 2781 2775 2782 *rsubstream = substream; 2776 2783 return 0; … … 3000 3007 snd_pcm_hw_avail(substream)); 3001 3008 snd_pcm_stream_unlock_irq(substream); 3009 #ifndef TARGET_OS2 3010 if (ret >= 0) 3011 snd_pcm_dma_buffer_sync(substream, SNDRV_DMA_SYNC_DEVICE); 3012 #endif 3002 3013 return ret; 3003 3014 } … … 3017 3028 snd_pcm_avail(substream)); 3018 3029 snd_pcm_stream_unlock_irq(substream); 3030 #ifndef TARGET_OS2 3031 if (ret >= 0) 3032 snd_pcm_dma_buffer_sync(substream, SNDRV_DMA_SYNC_DEVICE); 3033 #endif 3019 3034 return ret; 3020 3035 } 3021 3036 3022 static int snd_pcm_hwsync(struct snd_pcm_substream *substream) 3037 static int snd_pcm_delay(struct snd_pcm_substream *substream, 3038 snd_pcm_sframes_t *delay) 3023 3039 { 3024 3040 int err; … … 3026 3042 snd_pcm_stream_lock_irq(substream); 3027 3043 err = do_pcm_hwsync(substream); 3044 if (delay && !err) 3045 *delay = snd_pcm_calc_delay(substream); 3028 3046 snd_pcm_stream_unlock_irq(substream); 3047 #ifndef TARGET_OS2 3048 snd_pcm_dma_buffer_sync(substream, SNDRV_DMA_SYNC_CPU); 3049 #endif 3029 3050 return err; 3030 3051 } 3031 3052 3032 static int snd_pcm_delay(struct snd_pcm_substream *substream, 3033 snd_pcm_sframes_t *delay) 3034 { 3035 int err; 3036 snd_pcm_sframes_t n = 0; 3037 3038 snd_pcm_stream_lock_irq(substream); 3039 err = do_pcm_hwsync(substream); 3040 if (!err) 3041 n = snd_pcm_calc_delay(substream); 3042 snd_pcm_stream_unlock_irq(substream); 3043 if (!err) 3044 *delay = n; 3045 return err; 3046 } 3047 3053 static inline int snd_pcm_hwsync(struct snd_pcm_substream *substream) 3054 { 3055 return snd_pcm_delay(substream, NULL); 3056 } 3057 3048 3058 static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream, 3049 3059 struct snd_pcm_sync_ptr __user *_sync_ptr) … … 3088 3098 sync_ptr.s.status.audio_tstamp = status->audio_tstamp; 3089 3099 snd_pcm_stream_unlock_irq(substream); 3100 #ifndef TARGET_OS2 3101 if (!(sync_ptr.flags & SNDRV_PCM_SYNC_PTR_APPL)) 3102 snd_pcm_dma_buffer_sync(substream, SNDRV_DMA_SYNC_DEVICE); 3103 #endif 3090 3104 if (copy_to_user(_sync_ptr, &sync_ptr, sizeof(sync_ptr))) 3091 3105 return -EFAULT; … … 3192 3206 sstatus.audio_tstamp = status->audio_tstamp; 3193 3207 snd_pcm_stream_unlock_irq(substream); 3208 #ifndef TARGET_OS2 3209 if (!(sflags & SNDRV_PCM_SYNC_PTR_APPL)) 3210 snd_pcm_dma_buffer_sync(substream, SNDRV_DMA_SYNC_DEVICE); 3211 #endif 3194 3212 if (put_user(sstatus.state, &src->s.status.state) || 3195 3213 put_user(sstatus.hw_ptr, &src->s.status.hw_ptr) || … … 3313 3331 if (PCM_RUNTIME_CHECK(substream)) 3314 3332 return -ENXIO; 3333 3334 if (substream->runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) 3335 return -EBADFD; 3315 3336 3316 3337 res = snd_power_wait(substream->pcm->card); … … 3368 3389 case SNDRV_PCM_IOCTL_DELAY: 3369 3390 { 3370 snd_pcm_sframes_t delay ;3391 snd_pcm_sframes_t delay = 0; 3371 3392 snd_pcm_sframes_t __user *res = arg; 3372 3393 int err; … … 3440 3461 snd_pcm_sframes_t result; 3441 3462 3463 if (substream->runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) 3464 return -EBADFD; 3465 3442 3466 switch (cmd) { 3443 3467 case SNDRV_PCM_IOCTL_FORWARD: … … 3482 3506 return -ENXIO; 3483 3507 runtime = substream->runtime; 3484 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) 3508 if (runtime->status->state == SNDRV_PCM_STATE_OPEN || 3509 runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) 3485 3510 return -EBADFD; 3486 3511 if (!frame_aligned(runtime, count)) … … 3506 3531 return -ENXIO; 3507 3532 runtime = substream->runtime; 3508 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) 3533 if (runtime->status->state == SNDRV_PCM_STATE_OPEN || 3534 runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) 3509 3535 return -EBADFD; 3510 3536 if (!frame_aligned(runtime, count)) … … 3536 3562 return -ENXIO; 3537 3563 runtime = substream->runtime; 3538 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) 3564 if (runtime->status->state == SNDRV_PCM_STATE_OPEN || 3565 runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) 3539 3566 return -EBADFD; 3540 3567 if (!iter_is_iovec(to)) … … 3572 3599 return -ENXIO; 3573 3600 runtime = substream->runtime; 3574 if (runtime->status->state == SNDRV_PCM_STATE_OPEN) 3601 if (runtime->status->state == SNDRV_PCM_STATE_OPEN || 3602 runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) 3575 3603 return -EBADFD; 3576 3604 if (!iter_is_iovec(from)) … … 3611 3639 3612 3640 runtime = substream->runtime; 3641 if (runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) 3642 return ok | EPOLLERR; 3643 3613 3644 poll_wait(file, &runtime->sleep, wait); 3614 3645 … … 3922 3953 if (PCM_RUNTIME_CHECK(substream)) 3923 3954 return -ENXIO; 3955 if (substream->runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) 3956 return -EBADFD; 3924 3957 3925 3958 offset = area->vm_pgoff << PAGE_SHIFT; … … 3959 3992 return -ENXIO; 3960 3993 runtime = substream->runtime; 3994 if (runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) 3995 return -EBADFD; 3961 3996 return fasync_helper(fd, file, on, &runtime->fasync); 3962 3997 } -
GPL/branches/uniaud32-exp/alsa-kernel/core/timer.c
r725 r736 85 85 struct timespec64 tstamp; /* trigger tstamp */ 86 86 wait_queue_head_t qchange_sleep; 87 struct snd_fasync*fasync;87 struct fasync_struct *fasync; 88 88 struct mutex ioctl_lock; 89 89 }; … … 1362 1362 __wake: 1363 1363 spin_unlock(&tu->qlock); 1364 snd_kill_fasync(tu->fasync, SIGIO, POLL_IN);1364 kill_fasync(&tu->fasync, SIGIO, POLL_IN); 1365 1365 wake_up(&tu->qchange_sleep); 1366 1366 } … … 1400 1400 snd_timer_user_append_to_tqueue(tu, &r1); 1401 1401 spin_unlock_irqrestore(&tu->qlock, flags); 1402 snd_kill_fasync(tu->fasync, SIGIO, POLL_IN);1402 kill_fasync(&tu->fasync, SIGIO, POLL_IN); 1403 1403 wake_up(&tu->qchange_sleep); 1404 1404 } … … 1470 1470 if (append == 0) 1471 1471 return; 1472 snd_kill_fasync(tu->fasync, SIGIO, POLL_IN);1472 kill_fasync(&tu->fasync, SIGIO, POLL_IN); 1473 1473 wake_up(&tu->qchange_sleep); 1474 1474 } … … 1538 1538 } 1539 1539 mutex_unlock(&tu->ioctl_lock); 1540 snd_fasync_free(tu->fasync);1541 1540 kfree(tu->queue); 1542 1541 kfree(tu->tqueue); … … 2153 2152 2154 2153 tu = file->private_data; 2155 return snd_fasync_helper(fd, file, on, &tu->fasync);2154 return fasync_helper(fd, file, on, &tu->fasync); 2156 2155 } 2157 2156 -
GPL/branches/uniaud32-exp/alsa-kernel/hda/hdac_device.c
r711 r736 675 675 { 0x17e8, "Chrontel" }, 676 676 { 0x1854, "LG" }, 677 { 0x19e5, "Huawei" },678 677 { 0x1aec, "Wolfson Microelectronics" }, 679 678 { 0x1af4, "QEMU" }, -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/control.h
r725 r736 110 110 wait_queue_head_t change_sleep; 111 111 spinlock_t read_lock; 112 struct snd_fasync*fasync;112 struct fasync_struct *fasync; 113 113 int subscribed; /* read interface is activated */ 114 114 struct list_head events; /* waiting events for read */ -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/core.h
r725 r736 288 288 int snd_card_free(struct snd_card *card); 289 289 int snd_card_free_when_closed(struct snd_card *card); 290 int snd_card_free_on_error(struct device *dev, int ret);291 290 void snd_card_set_id(struct snd_card *card, const char *id); 292 291 int snd_card_register(struct snd_card *card); … … 543 542 #endif 544 543 545 /* async signal helpers */546 struct snd_fasync;547 548 int snd_fasync_helper(int fd, struct file *file, int on,549 struct snd_fasync **fasyncp);550 void snd_kill_fasync(struct snd_fasync *fasync, int signal, int poll);551 void snd_fasync_free(struct snd_fasync *fasync);552 553 544 #endif /* __SOUND_CORE_H */ -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/jack.h
r711 r736 63 63 #ifdef CONFIG_SND_JACK_INPUT_DEV 64 64 struct input_dev *input_dev; 65 struct mutex input_dev_lock;66 65 int registered; 67 66 int type; -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/memalloc.h
r716 r736 10 10 #define __SOUND_MEMALLOC_H 11 11 12 #include <linux/dma-direction.h> 12 13 #include <asm/page.h> 13 14 14 15 struct device; 15 16 struct vm_area_struct; 17 struct sg_table; 16 18 17 19 /* … … 20 22 struct snd_dma_device { 21 23 int type; /* SNDRV_DMA_TYPE_XXX */ 24 enum dma_data_direction dir; /* DMA direction */ 25 bool need_sync; /* explicit sync needed? */ 22 26 struct device *dev; /* generic device */ 23 27 }; … … 46 50 #endif 47 51 #define SNDRV_DMA_TYPE_VMALLOC 7 /* vmalloc'ed buffer */ 52 #define SNDRV_DMA_TYPE_NONCONTIG 8 /* non-coherent SG buffer */ 53 #define SNDRV_DMA_TYPE_NONCOHERENT 9 /* non-coherent buffer */ 48 54 49 55 /* … … 67 73 68 74 /* allocate/release a buffer */ 69 int snd_dma_alloc_pages(int type, struct device *dev, size_t size, 70 struct snd_dma_buffer *dmab); 75 int snd_dma_alloc_dir_pages(int type, struct device *dev, 76 enum dma_data_direction dir, size_t size, 77 struct snd_dma_buffer *dmab); 78 79 static inline int snd_dma_alloc_pages(int type, struct device *dev, 80 size_t size, struct snd_dma_buffer *dmab) 81 { 82 return snd_dma_alloc_dir_pages(type, dev, DMA_BIDIRECTIONAL, size, dmab); 83 } 84 71 85 int snd_dma_alloc_pages_fallback(int type, struct device *dev, size_t size, 72 86 struct snd_dma_buffer *dmab); … … 74 88 int snd_dma_buffer_mmap(struct snd_dma_buffer *dmab, 75 89 struct vm_area_struct *area); 90 91 enum snd_dma_sync_mode { SNDRV_DMA_SYNC_CPU, SNDRV_DMA_SYNC_DEVICE }; 92 #ifdef CONFIG_HAS_DMA 93 void snd_dma_buffer_sync(struct snd_dma_buffer *dmab, 94 enum snd_dma_sync_mode mode); 95 #else 96 static inline void snd_dma_buffer_sync(struct snd_dma_buffer *dmab, 97 enum snd_dma_sync_mode mode) {} 98 #endif 76 99 77 100 dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab, size_t offset); … … 81 104 82 105 /* device-managed memory allocator */ 83 struct snd_dma_buffer *snd_devm_alloc_pages(struct device *dev, int type, 84 size_t size); 106 struct snd_dma_buffer *snd_devm_alloc_dir_pages(struct device *dev, int type, 107 enum dma_data_direction dir, 108 size_t size); 109 110 static inline struct snd_dma_buffer * 111 snd_devm_alloc_pages(struct device *dev, int type, size_t size) 112 { 113 return snd_devm_alloc_dir_pages(dev, type, DMA_BIDIRECTIONAL, size); 114 } 115 116 static inline struct sg_table * 117 snd_dma_noncontig_sg_table(struct snd_dma_buffer *dmab) 118 { 119 return dmab->private_data; 120 } 121 85 122 #ifdef TARGET_OS2 86 123 int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab); -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/simple_card_utils.h
r694 r736 43 43 int codecs; 44 44 int platforms; 45 int c2c; 45 46 }; 46 47 … … 55 56 struct asoc_simple_data adata; 56 57 struct snd_soc_codec_conf *codec_conf; 58 struct snd_soc_pcm_stream *c2c_conf; 57 59 struct prop_nums num; 58 60 unsigned int mclk_fs; … … 65 67 struct snd_soc_dai_link_component dummy; 66 68 struct snd_soc_codec_conf *codec_conf; 69 struct snd_soc_pcm_stream *c2c_conf; 67 70 struct gpio_desc *pa_gpio; 68 71 const struct snd_soc_ops *ops; … … 116 119 (i)++) 117 120 118 #define SNDRV_MAX_LINKS 128121 #define SNDRV_MAX_LINKS 512 119 122 120 123 struct link_info { … … 181 184 182 185 int asoc_graph_card_probe(struct snd_soc_card *card); 186 int asoc_graph_is_ports0(struct device_node *port); 183 187 184 188 #ifdef DEBUG -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-acpi.h
r694 r736 130 130 * 131 131 * @id: ACPI ID (usually the codec's) used to find a matching machine driver. 132 * @comp_ids: list of compatible audio codecs using the same machine driver, 133 * firmware and topology 132 134 * @link_mask: describes required board layout, e.g. for SoundWire. 133 135 * @links: array of link _ADR descriptors, null terminated. … … 146 148 /* Descriptor for SST ASoC machine driver */ 147 149 struct snd_soc_acpi_mach { 148 const u8 id[ACPI_ID_LEN]; 150 u8 id[ACPI_ID_LEN]; 151 const struct snd_soc_acpi_codecs *comp_ids; 149 152 const u32 link_mask; 150 153 const struct snd_soc_acpi_link_adr *links; -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-component.h
r694 r736 221 221 222 222 /* function mark */ 223 struct snd_pcm_substream*mark_module;223 void *mark_module; 224 224 struct snd_pcm_substream *mark_open; 225 225 struct snd_pcm_substream *mark_hw_params; … … 228 228 void *mark_pm; 229 229 230 #ifdef CONFIG_DEBUG_FS231 230 struct dentry *debugfs_root; 232 231 const char *debugfs_prefix; 233 #endif234 232 }; 235 233 … … 334 332 { 335 333 return regcache_sync(component->regmap); 334 } 335 336 static inline int snd_soc_component_is_codec(struct snd_soc_component *component) 337 { 338 return component->driver->non_legacy_dai_naming; 336 339 } 337 340 … … 392 395 snd_soc_component_module_get(component, substream, 1) 393 396 int snd_soc_component_module_get(struct snd_soc_component *component, 394 struct snd_pcm_substream *substream, 395 int upon_open); 397 void *mark, int upon_open); 396 398 #define snd_soc_component_module_put_when_remove(component) \ 397 399 snd_soc_component_module_put(component, NULL, 0, 0) … … 399 401 snd_soc_component_module_put(component, substream, 1, rollback) 400 402 void snd_soc_component_module_put(struct snd_soc_component *component, 401 struct snd_pcm_substream *substream, 402 int upon_open, int rollback); 403 void *mark, int upon_open, int rollback); 403 404 404 405 static inline void snd_soc_component_set_drvdata(struct snd_soc_component *c, … … 456 457 const struct of_phandle_args *args, 457 458 const char **dai_name); 458 int snd_soc_component_compr_open(struct snd_compr_stream *cstream); 459 void snd_soc_component_compr_free(struct snd_compr_stream *cstream, 459 int snd_soc_component_compr_open(struct snd_soc_component *component, 460 struct snd_compr_stream *cstream); 461 void snd_soc_component_compr_free(struct snd_soc_component *component, 462 struct snd_compr_stream *cstream, 460 463 int rollback); 461 464 int snd_soc_component_compr_trigger(struct snd_compr_stream *cstream, int cmd); -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-dpcm.h
r694 r736 160 160 int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir, 161 161 int event); 162 bool dpcm_end_walk_at_be(struct snd_soc_dapm_widget *widget, enum snd_soc_dapm_direction dir); 162 163 163 164 #define dpcm_be_dai_startup_rollback(fe, stream, last) \ -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-topology.h
r711 r736 152 152 153 153 /* completion - called at completion of firmware loading */ 154 void (*complete)(struct snd_soc_component *);154 int (*complete)(struct snd_soc_component *comp); 155 155 156 156 /* manifest - optional to inform component of manifest */ -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/sof.h
r710 r736 75 75 int resindex_imr_base; 76 76 int irqindex_host_ipc; 77 int resindex_dma_base;78 79 /* DMA only valid when resindex_dma_base != -1*/80 int dma_engine;81 int dma_size;82 77 83 78 /* IPC timeouts in ms */ -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/version.h
r725 r736 1 1 /* include/version.h */ 2 #define CONFIG_SND_VERSION "5.1 5.65"2 #define CONFIG_SND_VERSION "5.16.20" 3 3 #define CONFIG_SND_DATE "" -
GPL/branches/uniaud32-exp/alsa-kernel/include/uapi/sound/asoc.h
r692 r736 241 241 __le32 size; /* in bytes of private data */ 242 242 union { 243 char data[0];244 struct snd_soc_tplg_vendor_array array[0];243 __DECLARE_FLEX_ARRAY(char, data); 244 __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_array, array); 245 245 }; 246 246 } __attribute__((packed)); -
GPL/branches/uniaud32-exp/alsa-kernel/include/uapi/sound/asound.h
r711 r736 1047 1047 #define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE) 1048 1048 #define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1<<2) /* control value may be changed without a notification */ 1049 / / (1 << 3) is unused.1049 /* (1 << 3) is unused. */ 1050 1050 #define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1<<4) /* TLV read is possible */ 1051 1051 #define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1<<5) /* TLV write is possible */ -
GPL/branches/uniaud32-exp/alsa-kernel/pci/ali5451/ali5451.c
r711 r736 2132 2132 } 2133 2133 2134 static int __snd_ali_probe(struct pci_dev *pci,2135 2134 static int snd_ali_probe(struct pci_dev *pci, 2135 const struct pci_device_id *pci_id) 2136 2136 { 2137 2137 struct snd_card *card; … … 2176 2176 pci_set_drvdata(pci, card); 2177 2177 return 0; 2178 }2179 2180 static int snd_ali_probe(struct pci_dev *pci,2181 const struct pci_device_id *pci_id)2182 {2183 return snd_card_free_on_error(&pci->dev, __snd_ali_probe(pci, pci_id));2184 2178 } 2185 2179 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/als4000.c
r711 r736 810 810 } 811 811 812 static int __snd_card_als4000_probe(struct pci_dev *pci,813 812 static int snd_card_als4000_probe(struct pci_dev *pci, 813 const struct pci_device_id *pci_id) 814 814 { 815 815 static int dev; … … 934 934 } 935 935 936 static int snd_card_als4000_probe(struct pci_dev *pci,937 const struct pci_device_id *pci_id)938 {939 return snd_card_free_on_error(&pci->dev, __snd_card_als4000_probe(pci, pci_id));940 }941 942 936 #ifdef CONFIG_PM_SLEEP 943 937 static int snd_als4000_suspend(struct device *dev) -
GPL/branches/uniaud32-exp/alsa-kernel/pci/atiixp.c
r715 r736 1595 1595 1596 1596 1597 static int __snd_atiixp_probe(struct pci_dev *pci,1598 1597 static int snd_atiixp_probe(struct pci_dev *pci, 1598 const struct pci_device_id *pci_id) 1599 1599 { 1600 1600 struct snd_card *card; … … 1650 1650 } 1651 1651 1652 static int snd_atiixp_probe(struct pci_dev *pci,1653 const struct pci_device_id *pci_id)1654 {1655 return snd_card_free_on_error(&pci->dev, __snd_atiixp_probe(pci, pci_id));1656 }1657 1658 1652 static struct pci_driver atiixp_driver = { 1659 1653 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/au88x0/au88x0.c
r711 r736 194 194 // constructor -- see "Constructor" sub-section 195 195 static int 196 __snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)196 snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) 197 197 { 198 198 static int dev; … … 311 311 } 312 312 313 static int314 snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)315 {316 return snd_card_free_on_error(&pci->dev, __snd_vortex_probe(pci, pci_id));317 }318 319 313 // pci_driver definition 320 314 static struct pci_driver vortex_driver = { -
GPL/branches/uniaud32-exp/alsa-kernel/pci/bt87x.c
r711 r736 824 824 } 825 825 826 static int __snd_bt87x_probe(struct pci_dev *pci,827 826 static int snd_bt87x_probe(struct pci_dev *pci, 827 const struct pci_device_id *pci_id) 828 828 { 829 829 static int dev; … … 908 908 } 909 909 910 static int snd_bt87x_probe(struct pci_dev *pci,911 const struct pci_device_id *pci_id)912 {913 return snd_card_free_on_error(&pci->dev, __snd_bt87x_probe(pci, pci_id));914 }915 916 910 /* default entries for all Bt87x cards - it's not exported */ 917 911 /* driver_data is set to 0 to call detection */ -
GPL/branches/uniaud32-exp/alsa-kernel/pci/ca0106/ca0106_main.c
r713 r736 1729 1729 1730 1730 1731 static int __snd_ca0106_probe(struct pci_dev *pci,1732 1731 static int snd_ca0106_probe(struct pci_dev *pci, 1732 const struct pci_device_id *pci_id) 1733 1733 { 1734 1734 static int dev; … … 1788 1788 dev++; 1789 1789 return 0; 1790 }1791 1792 static int snd_ca0106_probe(struct pci_dev *pci,1793 const struct pci_device_id *pci_id)1794 {1795 return snd_card_free_on_error(&pci->dev, __snd_ca0106_probe(pci, pci_id));1796 1790 } 1797 1791 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/cmipci.c
r715 r736 3238 3238 static int dev; 3239 3239 struct snd_card *card; 3240 struct cmipci *cm;3241 3240 int err; 3242 3241 … … 3249 3248 3250 3249 err = snd_devm_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, 3251 sizeof( *cm), &card);3250 sizeof(struct cmipci), &card); 3252 3251 if (err < 0) 3253 3252 return err; 3254 cm = card->private_data;3255 3253 3256 3254 switch (pci->device) { … … 3270 3268 err = snd_cmipci_create(card, pci, dev); 3271 3269 if (err < 0) 3272 goto error;3270 return err; 3273 3271 3274 3272 err = snd_card_register(card); 3275 3273 if (err < 0) 3276 goto error;3274 return err; 3277 3275 3278 3276 pci_set_drvdata(pci, card); 3279 3277 dev++; 3280 3278 return 0; 3281 3282 error:3283 snd_card_free(card);3284 return err;3285 3279 } 3286 3280 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/cs4281.c
r715 r736 1844 1844 } 1845 1845 1846 static int __snd_cs4281_probe(struct pci_dev *pci,1847 1846 static int snd_cs4281_probe(struct pci_dev *pci, 1847 const struct pci_device_id *pci_id) 1848 1848 { 1849 1849 static int dev; … … 1905 1905 } 1906 1906 1907 static int snd_cs4281_probe(struct pci_dev *pci,1908 const struct pci_device_id *pci_id)1909 {1910 return snd_card_free_on_error(&pci->dev, __snd_cs4281_probe(pci, pci_id));1911 }1912 1913 1907 /* 1914 1908 * Power Management -
GPL/branches/uniaud32-exp/alsa-kernel/pci/cs46xx/cs46xx.c
r711 r736 82 82 external_amp[dev], thinkpad[dev]); 83 83 if (err < 0) 84 goto error;84 return err; 85 85 card->private_data = chip; 86 86 chip->accept_valid = mmap_valid[dev]; 87 87 err = snd_cs46xx_pcm(chip, 0); 88 88 if (err < 0) 89 goto error;89 return err; 90 90 #ifdef CONFIG_SND_CS46XX_NEW_DSP 91 91 err = snd_cs46xx_pcm_rear(chip, 1); 92 92 if (err < 0) 93 goto error;93 return err; 94 94 err = snd_cs46xx_pcm_iec958(chip, 2); 95 95 if (err < 0) 96 goto error;96 return err; 97 97 #endif 98 98 err = snd_cs46xx_mixer(chip, 2); 99 99 if (err < 0) 100 goto error;100 return err; 101 101 #ifdef CONFIG_SND_CS46XX_NEW_DSP 102 102 if (chip->nr_ac97_codecs ==2) { 103 103 err = snd_cs46xx_pcm_center_lfe(chip, 3); 104 104 if (err < 0) 105 goto error;105 return err; 106 106 } 107 107 #endif 108 108 err = snd_cs46xx_midi(chip, 0); 109 109 if (err < 0) 110 goto error;110 return err; 111 111 err = snd_cs46xx_start_dsp(chip); 112 112 if (err < 0) 113 goto error;113 return err; 114 114 115 115 snd_cs46xx_gameport(chip); … … 125 125 err = snd_card_register(card); 126 126 if (err < 0) 127 goto error;127 return err; 128 128 129 129 pci_set_drvdata(pci, card); 130 130 dev++; 131 131 return 0; 132 133 error:134 snd_card_free(card);135 return err;136 132 } 137 133 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/cs5535audio/cs5535audio.c
r711 r736 286 286 } 287 287 288 static int __snd_cs5535audio_probe(struct pci_dev *pci,289 288 static int snd_cs5535audio_probe(struct pci_dev *pci, 289 const struct pci_device_id *pci_id) 290 290 { 291 291 static int dev; … … 334 334 dev++; 335 335 return 0; 336 }337 338 static int snd_cs5535audio_probe(struct pci_dev *pci,339 const struct pci_device_id *pci_id)340 {341 return snd_card_free_on_error(&pci->dev, __snd_cs5535audio_probe(pci, pci_id));342 336 } 343 337 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/emu10k1/emu10k1x.c
r711 r736 1499 1499 } 1500 1500 1501 static int __snd_emu10k1x_probe(struct pci_dev *pci,1502 1501 static int snd_emu10k1x_probe(struct pci_dev *pci, 1502 const struct pci_device_id *pci_id) 1503 1503 { 1504 1504 static int dev; … … 1562 1562 } 1563 1563 1564 static int snd_emu10k1x_probe(struct pci_dev *pci,1565 const struct pci_device_id *pci_id)1566 {1567 return snd_card_free_on_error(&pci->dev, __snd_emu10k1x_probe(pci, pci_id));1568 }1569 1570 1564 // PCI IDs 1571 1565 static const struct pci_device_id snd_emu10k1x_ids[] = { -
GPL/branches/uniaud32-exp/alsa-kernel/pci/ens1370.c
r732 r736 2320 2320 } 2321 2321 2322 static int __snd_audiopci_probe(struct pci_dev *pci,2323 2322 static int snd_audiopci_probe(struct pci_dev *pci, 2323 const struct pci_device_id *pci_id) 2324 2324 { 2325 2325 static int dev; … … 2385 2385 } 2386 2386 2387 static int snd_audiopci_probe(struct pci_dev *pci,2388 const struct pci_device_id *pci_id)2389 {2390 return snd_card_free_on_error(&pci->dev, __snd_audiopci_probe(pci, pci_id));2391 }2392 2393 2387 static struct pci_driver ens137x_driver = { 2394 2388 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/es1938.c
r711 r736 1752 1752 1753 1753 1754 static int __snd_es1938_probe(struct pci_dev *pci,1755 1754 static int snd_es1938_probe(struct pci_dev *pci, 1755 const struct pci_device_id *pci_id) 1756 1756 { 1757 1757 static int dev; … … 1832 1832 } 1833 1833 1834 static int snd_es1938_probe(struct pci_dev *pci,1835 const struct pci_device_id *pci_id)1836 {1837 return snd_card_free_on_error(&pci->dev, __snd_es1938_probe(pci, pci_id));1838 }1839 1840 1834 static struct pci_driver es1938_driver = { 1841 1835 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/es1968.c
r715 r736 2778 2778 /* 2779 2779 */ 2780 static int __snd_es1968_probe(struct pci_dev *pci,2781 2780 static int snd_es1968_probe(struct pci_dev *pci, 2781 const struct pci_device_id *pci_id) 2782 2782 { 2783 2783 static int dev; … … 2885 2885 } 2886 2886 2887 static int snd_es1968_probe(struct pci_dev *pci,2888 const struct pci_device_id *pci_id)2889 {2890 return snd_card_free_on_error(&pci->dev, __snd_es1968_probe(pci, pci_id));2891 }2892 2893 2887 static struct pci_driver es1968_driver = { 2894 2888 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/fm801.c
r711 r736 1292 1292 } 1293 1293 1294 static int __snd_card_fm801_probe(struct pci_dev *pci,1295 1294 static int snd_card_fm801_probe(struct pci_dev *pci, 1295 const struct pci_device_id *pci_id) 1296 1296 { 1297 1297 static int dev; … … 1355 1355 dev++; 1356 1356 return 0; 1357 }1358 1359 static int snd_card_fm801_probe(struct pci_dev *pci,1360 const struct pci_device_id *pci_id)1361 {1362 return snd_card_free_on_error(&pci->dev, __snd_card_fm801_probe(pci, pci_id));1363 1357 } 1364 1358 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_auto_parser.c
r711 r736 828 828 } 829 829 830 void __snd_hda_apply_fixup(struct hda_codec *codec, int id, int action, int depth)830 static void apply_fixup(struct hda_codec *codec, int id, int action, int depth) 831 831 { 832 832 const char *modelname = codec->fixup_name; … … 838 838 break; 839 839 if (fix->chained_before) 840 __snd_hda_apply_fixup(codec, fix->chain_id, action, depth + 1);840 apply_fixup(codec, fix->chain_id, action, depth + 1); 841 841 842 842 switch (fix->type) { … … 879 879 } 880 880 } 881 EXPORT_SYMBOL_GPL(__snd_hda_apply_fixup);882 881 883 882 /** … … 889 888 { 890 889 if (codec->fixup_list) 891 __snd_hda_apply_fixup(codec, codec->fixup_id, action, 0);890 apply_fixup(codec, codec->fixup_id, action, 0); 892 891 } 893 892 EXPORT_SYMBOL_GPL(snd_hda_apply_fixup); -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_intel.c
r732 r736 2102 2102 }; 2103 2103 2104 static DECLARE_BITMAP(probed_devs, SNDRV_CARDS); 2105 2104 2106 static int azx_probe(struct pci_dev *pci, 2105 2107 const struct pci_device_id *pci_id) 2106 2108 { 2107 static int dev;2108 2109 struct snd_card *card; 2109 2110 struct hda_intel *hda; 2110 2111 struct azx *chip; 2111 2112 bool schedule_probe; 2113 int dev; 2112 2114 int err; 2113 2115 … … 2117 2119 } 2118 2120 2121 dev = find_first_zero_bit(probed_devs, SNDRV_CARDS); 2119 2122 if (dev >= SNDRV_CARDS) 2120 2123 return -ENODEV; 2121 2124 if (!enable[dev]) { 2122 dev++;2125 set_bit(dev, probed_devs); 2123 2126 return -ENOENT; 2124 2127 } … … 2195 2198 #endif 2196 2199 2197 dev++;2200 set_bit(dev, probed_devs); 2198 2201 if (chip->disabled) 2199 2202 complete_all(&hda->probe_wait); … … 2418 2421 device_lock(&pci->dev); 2419 2422 2423 clear_bit(chip->dev_index, probed_devs); 2424 pci_set_drvdata(pci, NULL); 2420 2425 snd_card_free(card); 2421 2426 } -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_local.h
r711 r736 365 365 const struct hda_pintbl *cfg); 366 366 void snd_hda_apply_fixup(struct hda_codec *codec, int action); 367 void __snd_hda_apply_fixup(struct hda_codec *codec, int id, int action, int depth);368 367 void snd_hda_pick_fixup(struct hda_codec *codec, 369 368 const struct hda_model_fixup *models, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_cirrus.c
r725 r736 400 400 /* codec SSID */ 401 401 SND_PCI_QUIRK(0x106b, 0x0600, "iMac 14,1", CS420X_IMAC27_122), 402 SND_PCI_QUIRK(0x106b, 0x0900, "iMac 12,1", CS420X_IMAC27_122),403 402 SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81), 404 403 SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_conexant.c
r725 r736 229 229 CXT_PINCFG_COMPAQ_CQ60, 230 230 CXT_FIXUP_STEREO_DMIC, 231 CXT_PINCFG_LENOVO_NOTEBOOK,232 231 CXT_FIXUP_INC_MIC_BOOST, 233 232 CXT_FIXUP_HEADPHONE_MIC_PIN, … … 814 813 .v.func = cxt_fixup_stereo_dmic, 815 814 }, 816 #ifdef TARGET_OS2xxx817 [CXT_PINCFG_LENOVO_NOTEBOOK] = {818 .type = HDA_FIXUP_PINS,819 .v.pins = (const struct hda_pintbl[]) {820 { 0x1a, 0x05d71030 },821 { }822 },823 .chain_id = CXT_FIXUP_STEREO_DMIC,824 },825 #endif826 815 [CXT_FIXUP_INC_MIC_BOOST] = { 827 816 .type = HDA_FIXUP_FUNC, … … 1016 1005 SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE), 1017 1006 SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE), 1018 SND_PCI_QUIRK(0x103c, 0x82b4, "HP ProDesk 600 G3", CXT_FIXUP_HP_MIC_NO_PRESENCE),1019 1007 SND_PCI_QUIRK(0x103c, 0x836e, "HP ProBook 455 G5", CXT_FIXUP_MUTE_LED_GPIO), 1020 1008 SND_PCI_QUIRK(0x103c, 0x837f, "HP ProBook 470 G5", CXT_FIXUP_MUTE_LED_GPIO), … … 1043 1031 SND_PCI_QUIRK(0x17aa, 0x390b, "Lenovo G50-80", CXT_FIXUP_STEREO_DMIC), 1044 1032 SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), 1045 SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_ PINCFG_LENOVO_NOTEBOOK),1033 SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC), 1046 1034 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC), 1047 1035 SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), … … 1125 1113 cxt5051_fixups, cxt_fixups); 1126 1114 break; 1127 case 0x14f15098:1128 codec->pin_amp_workaround = 1;1129 spec->gen.mixer_nid = 0x22;1130 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO;1131 snd_hda_pick_fixup(codec, cxt5066_fixup_models,1132 cxt5066_fixups, cxt_fixups);1133 break;1134 1115 case 0x14f150f2: 1135 1116 codec->power_save_node = 1; … … 1152 1133 goto error; 1153 1134 1154 err = cx_auto_parse_beep(codec);1135 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); 1155 1136 if (err < 0) 1156 1137 goto error; 1157 1138 1158 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);1139 err = cx_auto_parse_beep(codec); 1159 1140 if (err < 0) 1160 1141 goto error; -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_hdmi.c
r711 r736 1400 1400 last_try: 1401 1401 /* the last try; check the empty slots in pins */ 1402 for (i = 0; i < spec-> pcm_used; i++) {1402 for (i = 0; i < spec->num_nids; i++) { 1403 1403 if (!test_bit(i, &spec->pcm_bitmap)) 1404 1404 return i; … … 2276 2276 */ 2277 2277 2278 if (spec->dyn_pcm_no_legacy && codec->mst_no_extra_pcms) 2279 pcm_num = spec->num_cvts; 2280 else if (codec->mst_no_extra_pcms) 2278 if (codec->mst_no_extra_pcms) 2281 2279 pcm_num = spec->num_nids; 2282 2280 else -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_realtek.c
r733 r736 446 446 case 0x10ec0255: 447 447 case 0x10ec0256: 448 case 0x19e58326:449 448 case 0x10ec0257: 450 449 case 0x10ec0282: … … 584 583 case 0x10ec0236: 585 584 case 0x10ec0256: 586 case 0x19e58326:587 585 case 0x10ec0283: 588 586 case 0x10ec0286: … … 943 941 } 944 942 945 #define alc_free snd_hda_gen_free946 947 #ifdef CONFIG_PM948 943 static inline void alc_shutup(struct hda_codec *codec) 949 944 { … … 959 954 } 960 955 956 #define alc_free snd_hda_gen_free 957 958 #ifdef CONFIG_PM 961 959 static void alc_power_eapd(struct hda_codec *codec) 962 960 { … … 972 970 return 0; 973 971 } 974 972 #endif 973 974 #ifdef CONFIG_PM 975 975 static int alc_resume(struct hda_codec *codec) 976 976 { … … 2339 2339 ALC887_FIXUP_ASUS_AUDIO, 2340 2340 ALC887_FIXUP_ASUS_HMIC, 2341 ALCS1200A_FIXUP_MIC_VREF,2342 2341 }; 2343 2342 … … 3073 3072 .chain_id = ALC887_FIXUP_ASUS_AUDIO, 3074 3073 }, 3075 #ifdef TARGET_OS2xxx3076 [ALCS1200A_FIXUP_MIC_VREF] = {3077 .type = HDA_FIXUP_PINCTLS,3078 .v.pins = (const struct hda_pintbl[]) {3079 { 0x18, PIN_VREF50 }, /* rear mic */3080 { 0x19, PIN_VREF50 }, /* front mic */3081 {}3082 }3083 },3084 #endif3085 3074 }; 3086 3075 … … 3120 3109 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS), 3121 3110 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3), 3122 SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF),3123 3111 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), 3124 3112 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP), … … 3175 3163 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3176 3164 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3177 SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),3178 3165 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3179 3166 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3180 3167 SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3181 3168 SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3182 SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),3183 3169 SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3184 3170 SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS), … … 3783 3769 ALC269_TYPE_ALC215, 3784 3770 ALC269_TYPE_ALC225, 3785 ALC269_TYPE_ALC245,3786 3771 ALC269_TYPE_ALC287, 3787 3772 ALC269_TYPE_ALC294, … … 3821 3806 case ALC269_TYPE_ALC215: 3822 3807 case ALC269_TYPE_ALC225: 3823 case ALC269_TYPE_ALC245:3824 3808 case ALC269_TYPE_ALC287: 3825 3809 case ALC269_TYPE_ALC294: … … 3891 3875 case 0x10ec0236: 3892 3876 case 0x10ec0256: 3893 case 0x19e58326:3894 3877 alc_write_coef_idx(codec, 0x48, 0x0); 3895 3878 alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); … … 3920 3903 case 0x10ec0236: 3921 3904 case 0x10ec0256: 3922 case 0x19e58326:3923 3905 alc_write_coef_idx(codec, 0x48, 0xd011); 3924 3906 alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); … … 4353 4335 bool hp1_pin_sense, hp2_pin_sense; 4354 4336 4355 if (spec->codec_variant != ALC269_TYPE_ALC287 && 4356 spec->codec_variant != ALC269_TYPE_ALC245) 4337 if (spec->codec_variant != ALC269_TYPE_ALC287) 4357 4338 /* required only at boot or S3 and S4 resume time */ 4358 4339 #ifndef TARGET_OS2 … … 5603 5584 case 0x10ec0236: 5604 5585 case 0x10ec0256: 5605 case 0x19e58326:5606 5586 alc_process_coef_fw(codec, coef0256); 5607 5587 break; … … 5719 5699 case 0x10ec0236: 5720 5700 case 0x10ec0256: 5721 case 0x19e58326:5722 5701 alc_write_coef_idx(codec, 0x45, 0xc489); 5723 5702 snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); … … 5870 5849 case 0x10ec0236: 5871 5850 case 0x10ec0256: 5872 case 0x19e58326:5873 5851 alc_write_coef_idx(codec, 0x1b, 0x0e4b); 5874 5852 alc_write_coef_idx(codec, 0x45, 0xc089); … … 5970 5948 case 0x10ec0236: 5971 5949 case 0x10ec0256: 5972 case 0x19e58326:5973 5950 alc_process_coef_fw(codec, coef0256); 5974 5951 break; … … 6085 6062 case 0x10ec0236: 6086 6063 case 0x10ec0256: 6087 case 0x19e58326:6088 6064 alc_process_coef_fw(codec, coef0256); 6089 6065 break; … … 6187 6163 case 0x10ec0236: 6188 6164 case 0x10ec0256: 6189 case 0x19e58326:6190 6165 alc_write_coef_idx(codec, 0x1b, 0x0e4b); 6191 6166 alc_write_coef_idx(codec, 0x06, 0x6104); … … 6484 6459 case 0x10ec0236: 6485 6460 case 0x10ec0256: 6486 case 0x19e58326:6487 6461 alc_process_coef_fw(codec, alc256fw); 6488 6462 break; … … 7088 7062 case 0x10ec0255: 7089 7063 case 0x10ec0256: 7090 case 0x19e58326:7091 7064 alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */ 7092 7065 alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15); … … 7419 7392 ALC269VB_FIXUP_ASUS_ZENBOOK, 7420 7393 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, 7421 ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE,7422 7394 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, 7423 7395 ALC269VB_FIXUP_ORDISSIMO_EVE2, … … 7479 7451 ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, 7480 7452 ALC269_FIXUP_ATIV_BOOK_8, 7481 ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE,7482 7453 ALC221_FIXUP_HP_MIC_NO_PRESENCE, 7483 7454 ALC256_FIXUP_ASUS_HEADSET_MODE, … … 7584 7555 ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, 7585 7556 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS, 7586 ALC298_FIXUP_LENOVO_C940_DUET7,7587 7557 ALC287_FIXUP_13S_GEN2_SPEAKERS, 7588 7558 ALC256_FIXUP_SET_COEF_DEFAULTS, … … 7593 7563 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, 7594 7564 }; 7595 7596 #ifdef NOT_USED7597 /* A special fixup for Lenovo C940 and Yoga Duet 7;7598 * both have the very same PCI SSID, and we need to apply different fixups7599 * depending on the codec ID7600 */7601 static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,7602 const struct hda_fixup *fix,7603 int action)7604 {7605 int id;7606 7607 if (codec->core.vendor_id == 0x10ec0298)7608 id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */7609 else7610 id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */7611 __snd_hda_apply_fixup(codec, id, action, 0);7612 }7613 #endif7614 7565 7615 7566 #ifdef TARGET_OS2 … … 8251 8202 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK, 8252 8203 }, 8253 #ifdef TARGET_OS2xxx8254 [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = {8255 .type = HDA_FIXUP_PINS,8256 .v.pins = (const struct hda_pintbl[]) {8257 { 0x18, 0x01a110f0 }, /* use as headset mic */8258 { }8259 },8260 .chained = true,8261 .chain_id = ALC269_FIXUP_HEADSET_MIC8262 },8263 #endif8264 8204 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { 8265 8205 .type = HDA_FIXUP_FUNC, … … 8718 8658 }, 8719 8659 #ifdef TARGET_OS2xxx 8720 [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = {8721 .type = HDA_FIXUP_PINS,8722 .v.pins = (const struct hda_pintbl[]) {8723 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */8724 { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */8725 { }8726 },8727 .chained = true,8728 .chain_id = ALC269_FIXUP_HEADSET_MODE8729 },8730 8660 [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = { 8731 8661 .type = HDA_FIXUP_PINS, … … 9646 9576 .chained = true, 9647 9577 .chain_id = ALC269_FIXUP_HEADSET_MODE, 9648 },9649 [ALC298_FIXUP_LENOVO_C940_DUET7] = {9650 .type = HDA_FIXUP_FUNC,9651 .v.func = alc298_fixup_lenovo_c940_duet7,9652 9578 }, 9653 9579 [ALC287_FIXUP_13S_GEN2_SPEAKERS] = { … … 9735 9661 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 9736 9662 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC), 9737 SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),9738 9663 SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 9739 9664 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), … … 9745 9670 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC), 9746 9671 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), 9747 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),9748 9672 SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS), 9749 9673 SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X), … … 9800 9724 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 9801 9725 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 9802 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),9803 9726 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 9804 9727 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), … … 9860 9783 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 9861 9784 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), 9862 SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE),9863 9785 SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE), 9864 9786 SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE), … … 9881 9803 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED), 9882 9804 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO), 9883 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),9884 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),9885 9805 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 9886 9806 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), … … 9898 9818 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation", 9899 9819 ALC285_FIXUP_HP_GPIO_AMP_INIT), 9900 SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),9901 SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),9902 9820 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 9903 9821 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED), … … 9927 9845 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), 9928 9846 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED), 9929 SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED),9930 9847 SND_PCI_QUIRK(0x103c, 0x89c3, "HP", ALC285_FIXUP_HP_GPIO_LED), 9931 9848 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 9932 SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),9933 SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED),9934 SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED),9935 SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED),9936 SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED),9937 9849 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 9938 9850 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), … … 9949 9861 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC), 9950 9862 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC), 9951 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE),9952 9863 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC), 9953 9864 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), … … 10025 9936 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10026 9937 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10027 SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),10028 9938 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10029 9939 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10052 9962 SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10053 9963 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10054 SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),10055 SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),10056 SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),10057 9964 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10058 9965 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10067 9974 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10068 9975 SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10069 SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),10070 9976 SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10071 9977 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10136 10042 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 10137 10043 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), 10138 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),10139 10044 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), 10140 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),10045 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME), 10141 10046 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), 10142 SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),10143 10047 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), 10144 10048 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF), … … 10168 10072 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10169 10073 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10170 SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),10171 10074 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10172 10075 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), … … 10182 10085 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X), 10183 10086 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS), 10184 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP),10185 SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP),10186 SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),10187 SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),10188 SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP),10189 SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),10190 SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP),10191 SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP),10192 10087 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 10193 10088 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), 10194 10089 SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), 10195 SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),10196 10090 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 10197 10091 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), … … 10977 10871 case 0x10ec0236: 10978 10872 case 0x10ec0256: 10979 case 0x19e58326:10980 10873 spec->codec_variant = ALC269_TYPE_ALC256; 10981 10874 spec->shutup = alc256_shutup; … … 10993 10886 case 0x10ec0285: 10994 10887 case 0x10ec0289: 10995 if (alc_get_coef0(codec) & 0x0010) 10996 spec->codec_variant = ALC269_TYPE_ALC245; 10997 else 10998 spec->codec_variant = ALC269_TYPE_ALC215; 10888 spec->codec_variant = ALC269_TYPE_ALC215; 10999 10889 spec->shutup = alc225_shutup; 11000 10890 spec->init_hook = alc225_init; … … 11644 11534 ALC897_FIXUP_LENOVO_HEADSET_MIC, 11645 11535 ALC897_FIXUP_HEADSET_MIC_PIN, 11646 ALC897_FIXUP_HP_HSMIC_VERB,11647 11536 }; 11648 11537 … … 12251 12140 .chained = true, 12252 12141 .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC 12253 },12254 [ALC897_FIXUP_HP_HSMIC_VERB] = {12255 .type = HDA_FIXUP_PINS,12256 .v.pins = (const struct hda_pintbl[]) {12257 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */12258 { }12259 },12260 12142 }, 12261 12143 #endif … … 12285 12167 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 12286 12168 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 12287 SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB),12288 12169 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2), 12289 SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2),12290 12170 SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2), 12291 12171 SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE), … … 12307 12187 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE), 12308 12188 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS), 12309 SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN),12310 12189 SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN), 12311 12190 SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN), … … 12669 12548 HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882), 12670 12549 HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882), 12671 HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),12672 12550 {0} /* terminator */ 12673 12551 }; -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_via.c
r711 r736 529 529 return err; 530 530 531 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); 532 if (err < 0) 533 return err; 534 531 535 err = auto_parse_beep(codec); 532 if (err < 0)533 return err;534 535 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);536 536 if (err < 0) 537 537 return err; -
GPL/branches/uniaud32-exp/alsa-kernel/pci/intel8x0.c
r713 r736 3133 3133 } 3134 3134 3135 static int __snd_intel8x0_probe(struct pci_dev *pci,3136 3135 static int snd_intel8x0_probe(struct pci_dev *pci, 3136 const struct pci_device_id *pci_id) 3137 3137 { 3138 3138 struct snd_card *card; … … 3213 3213 } 3214 3214 3215 static int snd_intel8x0_probe(struct pci_dev *pci,3216 const struct pci_device_id *pci_id)3217 {3218 return snd_card_free_on_error(&pci->dev, __snd_intel8x0_probe(pci, pci_id));3219 }3220 3221 3215 static struct pci_driver intel8x0_driver = { 3222 3216 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/korg1212/korg1212.c
r711 r736 2356 2356 err = snd_korg1212_create(card, pci); 2357 2357 if (err < 0) 2358 goto error;2358 return err; 2359 2359 2360 2360 strcpy(card->driver, "korg1212"); … … 2367 2367 err = snd_card_register(card); 2368 2368 if (err < 0) 2369 goto error;2369 return err; 2370 2370 pci_set_drvdata(pci, card); 2371 2371 dev++; 2372 2372 return 0; 2373 2374 error:2375 snd_card_free(card);2376 return err;2377 2373 } 2378 2374 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/maestro3.c
r732 r736 2649 2649 */ 2650 2650 static int 2651 __snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)2651 snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) 2652 2652 { 2653 2653 static int dev; … … 2714 2714 } 2715 2715 2716 static int2717 snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)2718 {2719 return snd_card_free_on_error(&pci->dev, __snd_m3_probe(pci, pci_id));2720 }2721 2722 2716 static struct pci_driver m3_driver = { 2723 2717 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/nm256/nm256.c
r711 r736 1578 1578 1579 1579 snd_nm256_init_chip(chip); 1580 card->private_free = snd_nm256_free; 1580 1581 1581 1582 // pci_set_master(pci); /* needed? */ … … 1684 1685 if (err < 0) 1685 1686 return err; 1686 card->private_free = snd_nm256_free;1687 1687 1688 1688 pci_set_drvdata(pci, card); -
GPL/branches/uniaud32-exp/alsa-kernel/pci/rme9652/hdsp.c
r711 r736 5445 5445 err = snd_hdsp_create(card, hdsp); 5446 5446 if (err) 5447 goto error;5447 return err; 5448 5448 5449 5449 strcpy(card->shortname, "Hammerfall DSP"); … … 5452 5452 err = snd_card_register(card); 5453 5453 if (err) 5454 goto error;5454 return err; 5455 5455 pci_set_drvdata(pci, card); 5456 5456 dev++; 5457 5457 return 0; 5458 5459 error:5460 snd_card_free(card);5461 return err;5462 5458 } 5463 5459 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/rme9652/hdspm.c
r711 r736 6896 6896 err = snd_hdspm_create(card, hdspm); 6897 6897 if (err < 0) 6898 goto error;6898 return err; 6899 6899 6900 6900 if (hdspm->io_type != MADIface) { … … 6915 6915 err = snd_card_register(card); 6916 6916 if (err < 0) 6917 goto error;6917 return err; 6918 6918 6919 6919 pci_set_drvdata(pci, card); … … 6921 6921 dev++; 6922 6922 return 0; 6923 6924 error:6925 snd_card_free(card);6926 return err;6927 6923 } 6928 6924 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/rme9652/rme9652.c
r711 r736 2573 2573 err = snd_rme9652_create(card, rme9652, precise_ptr[dev]); 2574 2574 if (err) 2575 goto error;2575 return err; 2576 2576 2577 2577 strcpy(card->shortname, rme9652->card_name); … … 2581 2581 err = snd_card_register(card); 2582 2582 if (err) 2583 goto error;2583 return err; 2584 2584 pci_set_drvdata(pci, card); 2585 2585 dev++; 2586 2586 return 0; 2587 2588 error:2589 snd_card_free(card);2590 return err;2591 2587 } 2592 2588 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/via82xx.c
r715 r736 2463 2463 }; 2464 2464 2465 static int __snd_via82xx_probe(struct pci_dev *pci,2466 2465 static int snd_via82xx_probe(struct pci_dev *pci, 2466 const struct pci_device_id *pci_id) 2467 2467 { 2468 2468 struct snd_card *card; … … 2574 2574 } 2575 2575 2576 static int snd_via82xx_probe(struct pci_dev *pci,2577 const struct pci_device_id *pci_id)2578 {2579 return snd_card_free_on_error(&pci->dev, __snd_via82xx_probe(pci, pci_id));2580 }2581 2582 2576 static struct pci_driver via82xx_driver = { 2583 2577 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/include/linux/dma-mapping.h
r697 r736 5 5 #include <linux/string.h> 6 6 #include <linux/err.h> 7 8 /* These definitions mirror those in pci.h, so they can be used9 * interchangeably with their PCI_ counterparts */10 enum dma_data_direction {11 DMA_BIDIRECTIONAL = 0,12 DMA_TO_DEVICE = 1,13 DMA_FROM_DEVICE = 2,14 DMA_NONE = 3,15 };16 7 17 8 /*
Note:
See TracChangeset
for help on using the changeset viewer.