Changeset 725 for GPL/branches
- Timestamp:
- Sep 5, 2022, 11:55:50 AM (3 years ago)
- Location:
- GPL/branches/uniaud32-next
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/alsa-kernel/core/control.c
r697 r725 130 130 control->vd[idx].owner = NULL; 131 131 up_write(&card->controls_rwsem); 132 snd_fasync_free(ctl->fasync); 132 133 snd_ctl_empty_read_queue(ctl); 133 134 put_pid(ctl->pid); … … 184 185 wake_up(&ctl->change_sleep); 185 186 spin_unlock(&ctl->read_lock); 186 kill_fasync(&ctl->fasync, SIGIO, POLL_IN);187 snd_kill_fasync(ctl->fasync, SIGIO, POLL_IN); 187 188 } 188 189 read_unlock_irqrestore(&card->ctl_files_rwlock, flags); … … 2016 2017 2017 2018 ctl = file->private_data; 2018 return fasync_helper(fd, file, on, &ctl->fasync);2019 return snd_fasync_helper(fd, file, on, &ctl->fasync); 2019 2020 } 2020 2021 … … 2184 2185 list_for_each_entry(ctl, &card->ctl_files, list, struct snd_ctl_file) { 2185 2186 wake_up(&ctl->change_sleep); 2186 kill_fasync(&ctl->fasync, SIGIO, POLL_ERR);2187 snd_kill_fasync(ctl->fasync, SIGIO, POLL_ERR); 2187 2188 } 2188 2189 read_unlock_irqrestore(&card->ctl_files_rwlock, flags); -
GPL/branches/uniaud32-next/alsa-kernel/core/info.c
r710 r725 113 113 mutex_lock(&entry->access); 114 114 if (entry->c.ops->llseek) { 115 offset = entry->c.ops->llseek(entry,116 117 115 ret = entry->c.ops->llseek(entry, 116 data->file_private_data, 117 file, offset, orig); 118 118 goto out; 119 119 } -
GPL/branches/uniaud32-next/alsa-kernel/core/misc.c
r711 r725 11 11 #include <linux/slab.h> 12 12 #include <linux/ioport.h> 13 #include <linux/fs.h> 13 14 #include <sound/core.h> 14 15 … … 146 147 EXPORT_SYMBOL(snd_pci_quirk_lookup); 147 148 #endif 149 150 /* 151 * Deferred async signal helpers 152 * 153 * Below are a few helper functions to wrap the async signal handling 154 * in the deferred work. The main purpose is to avoid the messy deadlock 155 * 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() has 158 * 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-next/alsa-kernel/core/timer.c
r711 r725 85 85 struct timespec64 tstamp; /* trigger tstamp */ 86 86 wait_queue_head_t qchange_sleep; 87 struct fasync_struct*fasync;87 struct snd_fasync *fasync; 88 88 struct mutex ioctl_lock; 89 89 }; … … 1362 1362 __wake: 1363 1363 spin_unlock(&tu->qlock); 1364 kill_fasync(&tu->fasync, SIGIO, POLL_IN);1364 snd_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 kill_fasync(&tu->fasync, SIGIO, POLL_IN);1402 snd_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 kill_fasync(&tu->fasync, SIGIO, POLL_IN);1472 snd_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); 1540 1541 kfree(tu->queue); 1541 1542 kfree(tu->tqueue); … … 2152 2153 2153 2154 tu = file->private_data; 2154 return fasync_helper(fd, file, on, &tu->fasync);2155 return snd_fasync_helper(fd, file, on, &tu->fasync); 2155 2156 } 2156 2157 -
GPL/branches/uniaud32-next/alsa-kernel/include/sound/control.h
r694 r725 110 110 wait_queue_head_t change_sleep; 111 111 spinlock_t read_lock; 112 struct fasync_struct*fasync;112 struct snd_fasync *fasync; 113 113 int subscribed; /* read interface is activated */ 114 114 struct list_head events; /* waiting events for read */ -
GPL/branches/uniaud32-next/alsa-kernel/include/sound/core.h
r711 r725 543 543 #endif 544 544 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 545 553 #endif /* __SOUND_CORE_H */ -
GPL/branches/uniaud32-next/alsa-kernel/include/sound/version.h
r712 r725 1 1 /* include/version.h */ 2 #define CONFIG_SND_VERSION "5.15. 59"2 #define CONFIG_SND_VERSION "5.15.65" 3 3 #define CONFIG_SND_DATE "" -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_cirrus.c
r710 r725 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), 402 403 SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81), 403 404 SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_conexant.c
r711 r725 229 229 CXT_PINCFG_COMPAQ_CQ60, 230 230 CXT_FIXUP_STEREO_DMIC, 231 CXT_PINCFG_LENOVO_NOTEBOOK, 231 232 CXT_FIXUP_INC_MIC_BOOST, 232 233 CXT_FIXUP_HEADPHONE_MIC_PIN, … … 813 814 .v.func = cxt_fixup_stereo_dmic, 814 815 }, 816 #ifdef TARGET_OS2xxx 817 [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 #endif 815 826 [CXT_FIXUP_INC_MIC_BOOST] = { 816 827 .type = HDA_FIXUP_FUNC, … … 1032 1043 SND_PCI_QUIRK(0x17aa, 0x390b, "Lenovo G50-80", CXT_FIXUP_STEREO_DMIC), 1033 1044 SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), 1034 SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_ FIXUP_STEREO_DMIC),1045 SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_PINCFG_LENOVO_NOTEBOOK), 1035 1046 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC), 1036 1047 SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_realtek.c
r720 r725 7419 7419 ALC269VB_FIXUP_ASUS_ZENBOOK, 7420 7420 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, 7421 ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE, 7421 7422 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, 7422 7423 ALC269VB_FIXUP_ORDISSIMO_EVE2, … … 8250 8251 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK, 8251 8252 }, 8253 #ifdef TARGET_OS2xxx 8254 [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_MIC 8262 }, 8263 #endif 8252 8264 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { 8253 8265 .type = HDA_FIXUP_FUNC, … … 9869 9881 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED), 9870 9882 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), 9871 9885 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 9872 9886 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), … … 9884 9898 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation", 9885 9899 ALC285_FIXUP_HP_GPIO_AMP_INIT), 9900 SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 9886 9901 SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 9887 9902 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), … … 9934 9949 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC), 9935 9950 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), 9936 9952 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC), 9937 9953 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), … … 10009 10025 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10010 10026 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), 10011 10028 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10012 10029 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10036 10053 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10037 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), 10038 10056 SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10039 10057 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), -
GPL/branches/uniaud32-next/include/linux/slab.h
r723 r725 94 94 static inline void *kzalloc(size_t size, gfp_t flags) 95 95 { 96 return kmalloc(size, flags | __GFP_ZERO);96 return __kmalloc(size, flags | __GFP_ZERO); 97 97 } 98 98 -
GPL/branches/uniaud32-next/include/linux/types.h
r718 r725 138 138 typedef phys_addr_t resource_size_t; 139 139 140 #define ATOMIC_INIT(i) { (i) } 141 #define ATOMIC_LONG_INIT(i) ATOMIC_INIT(i) 140 142 #endif /* _LINUX_TYPES_H */ -
GPL/branches/uniaud32-next/include/linux/workqueue.h
r688 r725 18 18 struct timer_list timer; 19 19 }; 20 21 #define WORK_DATA_STATIC_INIT() \ 22 ATOMIC_LONG_INIT((unsigned long)(WORK_STRUCT_NO_POOL | WORK_STRUCT_STATIC)) 20 23 21 24 struct workqueue_struct { … … 52 55 init_timer(&(_work)->timer); \ 53 56 } while (0) 54 #define __WORK_INITIALIZER(n, f , d) { \55 .func = (f), \56 .data = (d), \57 #define __WORK_INITIALIZER(n, f) { \ 58 .data = 0, \ 59 .func = (f), \ 57 60 } 58 #define DECLARE_WORK(n, f, d) \ 59 struct work_struct n = __WORK_INITIALIZER(n, f, d) 61 62 #define DECLARE_WORK(n, f) \ 63 struct work_struct n = __WORK_INITIALIZER(n, f) 60 64 61 65 /* redefine INIT_WORK() */ -
GPL/branches/uniaud32-next/lib32/memory.c
r723 r725 766 766 return buf; 767 767 } 768 768 769 //****************************************************************************** 769 770 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.