Changeset 737 for GPL/branches
- Timestamp:
- Sep 18, 2022, 7:39:50 AM (3 years ago)
- Location:
- GPL/branches/uniaud32-exp
- Files:
-
- 4 added
- 71 edited
-
alsa-kernel/core/info.c (modified) (2 diffs)
-
alsa-kernel/core/info_oss.c (modified) (1 diff)
-
alsa-kernel/core/init.c (modified) (3 diffs)
-
alsa-kernel/core/jack.c (modified) (10 diffs)
-
alsa-kernel/core/memalloc.c (modified) (1 diff)
-
alsa-kernel/core/pcm_lib.c (modified) (1 diff)
-
alsa-kernel/core/pcm_memory.c (modified) (2 diffs)
-
alsa-kernel/core/pcm_misc.c (modified) (1 diff)
-
alsa-kernel/core/pcm_native.c (modified) (1 diff)
-
alsa-kernel/hda/Makefile (modified) (1 diff)
-
alsa-kernel/hda/ext/hdac_ext_stream.c (modified) (30 diffs)
-
alsa-kernel/hda/hdac_component.c (added)
-
alsa-kernel/hda/hdac_stream.c (modified) (1 diff)
-
alsa-kernel/include/sound/config.h (modified) (1 diff)
-
alsa-kernel/include/sound/core.h (modified) (1 diff)
-
alsa-kernel/include/sound/dmaengine_pcm.h (modified) (2 diffs)
-
alsa-kernel/include/sound/hdaudio.h (modified) (1 diff)
-
alsa-kernel/include/sound/hdaudio_ext.h (modified) (2 diffs)
-
alsa-kernel/include/sound/intel-nhlt.h (modified) (4 diffs)
-
alsa-kernel/include/sound/jack.h (modified) (1 diff)
-
alsa-kernel/include/sound/memalloc.h (modified) (2 diffs)
-
alsa-kernel/include/sound/pcm.h (modified) (3 diffs)
-
alsa-kernel/include/sound/soc-component.h (modified) (2 diffs)
-
alsa-kernel/include/sound/soc-dai.h (modified) (6 diffs)
-
alsa-kernel/include/sound/soc-dpcm.h (modified) (1 diff)
-
alsa-kernel/include/sound/soc.h (modified) (2 diffs)
-
alsa-kernel/include/sound/sof.h (modified) (1 diff)
-
alsa-kernel/include/sound/version.h (modified) (1 diff)
-
alsa-kernel/include/uapi/sound/asound.h (modified) (2 diffs)
-
alsa-kernel/pci/ac97/ac97_pcm.c (modified) (1 diff)
-
alsa-kernel/pci/ali5451/ali5451.c (modified) (2 diffs)
-
alsa-kernel/pci/als4000.c (modified) (2 diffs)
-
alsa-kernel/pci/atiixp.c (modified) (2 diffs)
-
alsa-kernel/pci/au88x0/au88x0.c (modified) (2 diffs)
-
alsa-kernel/pci/bt87x.c (modified) (2 diffs)
-
alsa-kernel/pci/ca0106/ca0106_main.c (modified) (2 diffs)
-
alsa-kernel/pci/cmipci.c (modified) (1 diff)
-
alsa-kernel/pci/cs4281.c (modified) (2 diffs)
-
alsa-kernel/pci/cs5535audio/cs5535audio.c (modified) (2 diffs)
-
alsa-kernel/pci/emu10k1/emu10k1x.c (modified) (2 diffs)
-
alsa-kernel/pci/ens1370.c (modified) (2 diffs)
-
alsa-kernel/pci/es1938.c (modified) (2 diffs)
-
alsa-kernel/pci/es1968.c (modified) (2 diffs)
-
alsa-kernel/pci/fm801.c (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_auto_parser.c (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_bind.c (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_component2.h (added)
-
alsa-kernel/pci/hda/hda_generic.h (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_intel.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/hda_jack.c (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_jack.h (modified) (1 diff)
-
alsa-kernel/pci/hda/patch_conexant.c (modified) (1 diff)
-
alsa-kernel/pci/hda/patch_hdmi.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/patch_realtek.c (modified) (30 diffs)
-
alsa-kernel/pci/intel8x0.c (modified) (2 diffs)
-
alsa-kernel/pci/korg1212/korg1212.c (modified) (2 diffs)
-
alsa-kernel/pci/maestro3.c (modified) (2 diffs)
-
alsa-kernel/pci/nm256/nm256.c (modified) (2 diffs)
-
alsa-kernel/pci/rme9652/hdsp.c (modified) (2 diffs)
-
alsa-kernel/pci/rme9652/hdspm.c (modified) (3 diffs)
-
alsa-kernel/pci/rme9652/rme9652.c (modified) (2 diffs)
-
alsa-kernel/pci/via82xx.c (modified) (2 diffs)
-
include/linux/component.h (added)
-
include/linux/device.h (modified) (3 diffs)
-
include/linux/dma-mapping.h (modified) (1 diff)
-
include/linux/errno.h (modified) (1 diff)
-
include/linux/of.h (modified) (2 diffs)
-
include/linux/stddef.h (modified) (1 diff)
-
include/linux/string.h (modified) (1 diff)
-
include/linux/wait.h (modified) (1 diff)
-
lib32/Makefile (modified) (1 diff)
-
lib32/component.c (added)
-
lib32/devres.c (modified) (1 diff)
-
lib32/drivers_base.c (modified) (1 diff)
-
lib32/misc.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-exp/alsa-kernel/core/info.c
r736 r737 236 236 static int snd_info_entry_open(struct inode *inode, struct file *file) 237 237 { 238 struct snd_info_entry *entry = PDE_DATA(inode);238 struct snd_info_entry *entry = pde_data(inode); 239 239 struct snd_info_private_data *data; 240 240 int mode, err; … … 367 367 static int snd_info_text_entry_open(struct inode *inode, struct file *file) 368 368 { 369 struct snd_info_entry *entry = PDE_DATA(inode);369 struct snd_info_entry *entry = pde_data(inode); 370 370 struct snd_info_private_data *data; 371 371 int err; -
GPL/branches/uniaud32-exp/alsa-kernel/core/info_oss.c
r697 r737 33 33 if (string == NULL) { 34 34 x = snd_sndstat_strings[num][dev]; 35 if (x) { 36 kfree(x); 37 x = NULL; 38 } 35 kfree(x); 36 x = NULL; 39 37 } else { 40 38 x = kstrdup(string, GFP_KERNEL); -
GPL/branches/uniaud32-exp/alsa-kernel/core/init.c
r736 r737 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 and 218 * there have been other devres resources, you'd need to free the card manually 219 * via snd_card_free() call in the error; otherwise it may lead to UAF due to 220 * devres call orders. You can use snd_card_free_on_error() helper for 221 * handling it more easily. 216 222 */ 217 223 int snd_devm_card_new(struct device *parent, int idx, const char *xid, … … 239 245 } 240 246 EXPORT_SYMBOL_GPL(snd_devm_card_new); 247 248 /** 249 * snd_card_free_on_error - a small helper for handling devm probe errors 250 * @dev: the managed device object 251 * @ret: the return code from the probe callback 252 * 253 * This function handles the explicit snd_card_free() call at the error from 254 * the probe callback. It's just a small helper for simplifying the error 255 * 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); 241 269 242 270 static int snd_card_init(struct snd_card *card, struct device *parent, … … 1121 1149 int snd_power_ref_and_wait(struct snd_card *card) 1122 1150 { 1123 wait_queue_entry_t wait;1124 int result = 0;1125 1126 1151 snd_power_ref(card); 1127 /* fastpath */1128 1152 if (snd_power_get_state(card) == SNDRV_CTL_POWER_D0) 1129 1153 return 0; 1130 init_waitqueue_entry(&wait, current); 1131 add_wait_queue(&card->power_sleep, &wait); 1132 while (1) { 1133 if (card->shutdown) { 1134 result = -ENODEV; 1135 break; 1136 } 1137 if (snd_power_get_state(card) == SNDRV_CTL_POWER_D0) 1138 break; 1139 snd_power_unref(card); 1140 set_current_state(TASK_UNINTERRUPTIBLE); 1141 schedule_timeout(30 * HZ); 1142 snd_power_ref(card); 1143 } 1144 remove_wait_queue(&card->power_sleep, &wait); 1145 return result; 1154 wait_event_cmd(card->power_sleep, 1155 card->shutdown || 1156 snd_power_get_state(card) == SNDRV_CTL_POWER_D0, 1157 snd_power_unref(card), snd_power_ref(card)); 1158 return card->shutdown ? -ENODEV : 0; 1146 1159 } 1147 1160 EXPORT_SYMBOL_GPL(snd_power_ref_and_wait); -
GPL/branches/uniaud32-exp/alsa-kernel/core/jack.c
r736 r737 43 43 struct snd_jack *jack = device->device_data; 44 44 45 if (!jack->input_dev) 45 mutex_lock(&jack->input_dev_lock); 46 if (!jack->input_dev) { 47 mutex_unlock(&jack->input_dev_lock); 46 48 return 0; 49 } 47 50 48 51 /* If the input device is registered with the input subsystem … … 53 56 input_free_device(jack->input_dev); 54 57 jack->input_dev = NULL; 58 mutex_unlock(&jack->input_dev_lock); 55 59 #endif /* CONFIG_SND_JACK_INPUT_DEV */ 56 60 return 0; … … 91 95 card->shortname, jack->id); 92 96 93 if (!jack->input_dev) 97 mutex_lock(&jack->input_dev_lock); 98 if (!jack->input_dev) { 99 mutex_unlock(&jack->input_dev_lock); 94 100 return 0; 101 } 95 102 96 103 jack->input_dev->name = jack->name; … … 117 124 jack->registered = 1; 118 125 126 mutex_unlock(&jack->input_dev_lock); 119 127 return err; 120 128 } … … 518 526 } 519 527 520 /* don't creat input device for phantom jack */ 528 #ifdef CONFIG_SND_JACK_INPUT_DEV 529 mutex_init(&jack->input_dev_lock); 530 531 /* don't create input device for phantom jack */ 521 532 if (!phantom_jack) { 522 #ifdef CONFIG_SND_JACK_INPUT_DEV523 533 int i; 524 534 … … 538 548 jack_switch_types[i]); 539 549 550 } 540 551 #endif /* CONFIG_SND_JACK_INPUT_DEV */ 541 }542 552 543 553 err = snd_device_new(card, SNDRV_DEV_JACK, jack, &ops); … … 579 589 { 580 590 WARN_ON(jack->registered); 581 if (!jack->input_dev) 591 mutex_lock(&jack->input_dev_lock); 592 if (!jack->input_dev) { 593 mutex_unlock(&jack->input_dev_lock); 582 594 return; 595 } 583 596 584 597 jack->input_dev->dev.parent = parent; 598 mutex_unlock(&jack->input_dev_lock); 585 599 } 586 600 EXPORT_SYMBOL(snd_jack_set_parent); … … 630 644 /** 631 645 * snd_jack_report - Report the current status of a jack 646 * Note: This function uses mutexes and should be called from a 647 * context which can sleep (such as a workqueue). 632 648 * 633 649 * @jack: The jack to report status for … … 655 671 656 672 #ifdef CONFIG_SND_JACK_INPUT_DEV 657 if (!jack->input_dev) 673 mutex_lock(&jack->input_dev_lock); 674 if (!jack->input_dev) { 675 mutex_unlock(&jack->input_dev_lock); 658 676 return; 677 } 659 678 660 679 for (i = 0; i < ARRAY_SIZE(jack->key); i++) { … … 676 695 677 696 input_sync(jack->input_dev); 697 mutex_unlock(&jack->input_dev_lock); 678 698 #endif /* CONFIG_SND_JACK_INPUT_DEV */ 679 699 } -
GPL/branches/uniaud32-exp/alsa-kernel/core/memalloc.c
r736 r737 325 325 }; 326 326 327 #ifdef CONFIG_SND_DMA_SGBUF 328 static void *snd_dma_sg_fallback_alloc(struct snd_dma_buffer *dmab, size_t size); 329 #endif 330 327 331 /* 328 332 * return the physical address at the corresponding offset -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_lib.c
r736 r737 2165 2165 struct snd_pcm_runtime *runtime = substream->runtime; 2166 2166 snd_pcm_uframes_t old_appl_ptr = runtime->control->appl_ptr; 2167 snd_pcm_sframes_t diff; 2167 2168 int ret; 2168 2169 2169 2170 if (old_appl_ptr == appl_ptr) 2170 2171 return 0; 2172 2173 if (appl_ptr >= runtime->boundary) 2174 return -EINVAL; 2175 /* 2176 * check if a rewind is requested by the application 2177 */ 2178 if (substream->runtime->info & SNDRV_PCM_INFO_NO_REWINDS) { 2179 diff = appl_ptr - old_appl_ptr; 2180 if (diff >= 0) { 2181 if (diff > runtime->buffer_size) 2182 return -EINVAL; 2183 } else { 2184 if (runtime->boundary + diff > runtime->buffer_size) 2185 return -EINVAL; 2186 } 2187 } 2171 2188 2172 2189 runtime->control->appl_ptr = appl_ptr; -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_memory.c
r736 r737 466 466 int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream) 467 467 { 468 struct snd_card *card = substream->pcm->card;469 468 struct snd_pcm_runtime *runtime; 470 469 … … 475 474 return 0; 476 475 if (runtime->dma_buffer_p != &substream->dma_buffer) { 476 struct snd_card *card = substream->pcm->card; 477 477 478 /* it's a newly allocated buffer. release it now. */ 478 479 do_free_pages(card, runtime->dma_buffer_p); -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_misc.c
r736 r737 434 434 width = pcm_formats[(INT)format].phys; /* physical width */ 435 435 pat = pcm_formats[(INT)format].silence; 436 if (! width)436 if (!width || !pat) 437 437 return -EINVAL; 438 438 /* signed or 1 byte data */ -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_native.c
r736 r737 176 176 } 177 177 EXPORT_SYMBOL_GPL(_snd_pcm_stream_lock_irqsave); 178 179 unsigned long _snd_pcm_stream_lock_irqsave_nested(struct snd_pcm_substream *substream) 180 { 181 unsigned long flags = 0; 182 if (substream->pcm->nonatomic) 183 mutex_lock_nested(&substream->self_group.mutex, 184 SINGLE_DEPTH_NESTING); 185 else 186 spin_lock_irqsave_nested(&substream->self_group.lock, flags, 187 SINGLE_DEPTH_NESTING); 188 return flags; 189 } 190 EXPORT_SYMBOL_GPL(_snd_pcm_stream_lock_irqsave_nested); 178 191 179 192 /** -
GPL/branches/uniaud32-exp/alsa-kernel/hda/Makefile
r708 r737 13 13 # 14 14 #=================================================================== 15 FILES = hdac_device.obj array.obj hdac_stream.obj hdac_controller.obj hdac_bus.obj hda_bus_type.obj hdac_regmap.obj hdmi_chmap.obj 15 FILES = hdac_device.obj array.obj hdac_stream.obj hdac_controller.obj hdac_bus.obj hda_bus_type.obj hdac_regmap.obj hdmi_chmap.obj hdac_component.obj 16 16 17 17 TARGET = hdac -
GPL/branches/uniaud32-exp/alsa-kernel/hda/ext/hdac_ext_stream.c
r711 r737 19 19 * snd_hdac_ext_stream_init - initialize each stream (aka device) 20 20 * @bus: HD-audio core bus 21 * @ stream: HD-audio ext core stream object to initialize21 * @hext_stream: HD-audio ext core stream object to initialize 22 22 * @idx: stream index number 23 23 * @direction: stream direction (SNDRV_PCM_STREAM_PLAYBACK or SNDRV_PCM_STREAM_CAPTURE) … … 28 28 */ 29 29 void snd_hdac_ext_stream_init(struct hdac_bus *bus, 30 struct hdac_ext_stream *stream,31 int idx, int direction, int tag)30 struct hdac_ext_stream *hext_stream, 31 int idx, int direction, int tag) 32 32 { 33 33 if (bus->ppcap) { 34 stream->pphc_addr = bus->ppcap + AZX_PPHC_BASE +34 hext_stream->pphc_addr = bus->ppcap + AZX_PPHC_BASE + 35 35 AZX_PPHC_INTERVAL * idx; 36 36 37 stream->pplc_addr = bus->ppcap + AZX_PPLC_BASE +37 hext_stream->pplc_addr = bus->ppcap + AZX_PPLC_BASE + 38 38 AZX_PPLC_MULTI * bus->num_streams + 39 39 AZX_PPLC_INTERVAL * idx; … … 41 41 42 42 if (bus->spbcap) { 43 stream->spib_addr = bus->spbcap + AZX_SPB_BASE +43 hext_stream->spib_addr = bus->spbcap + AZX_SPB_BASE + 44 44 AZX_SPB_INTERVAL * idx + 45 45 AZX_SPB_SPIB; 46 46 47 stream->fifo_addr = bus->spbcap + AZX_SPB_BASE +47 hext_stream->fifo_addr = bus->spbcap + AZX_SPB_BASE + 48 48 AZX_SPB_INTERVAL * idx + 49 49 AZX_SPB_MAXFIFO; … … 51 51 52 52 if (bus->drsmcap) 53 stream->dpibr_addr = bus->drsmcap + AZX_DRSM_BASE +53 hext_stream->dpibr_addr = bus->drsmcap + AZX_DRSM_BASE + 54 54 AZX_DRSM_INTERVAL * idx; 55 55 56 stream->decoupled = false;57 snd_hdac_stream_init(bus, & stream->hstream, idx, direction, tag);56 hext_stream->decoupled = false; 57 snd_hdac_stream_init(bus, &hext_stream->hstream, idx, direction, tag); 58 58 } 59 59 EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_init); … … 68 68 */ 69 69 int snd_hdac_ext_stream_init_all(struct hdac_bus *bus, int start_idx, 70 int num_stream, int dir)70 int num_stream, int dir) 71 71 { 72 72 int stream_tag = 0; … … 74 74 75 75 for (i = 0; i < num_stream; i++) { 76 struct hdac_ext_stream * stream =77 kzalloc(sizeof(* stream), GFP_KERNEL);78 if (! stream)76 struct hdac_ext_stream *hext_stream = 77 kzalloc(sizeof(*hext_stream), GFP_KERNEL); 78 if (!hext_stream) 79 79 return -ENOMEM; 80 80 tag = ++stream_tag; 81 snd_hdac_ext_stream_init(bus, stream, idx, dir, tag);81 snd_hdac_ext_stream_init(bus, hext_stream, idx, dir, tag); 82 82 idx++; 83 83 } … … 96 96 { 97 97 struct hdac_stream *s, *_s; 98 struct hdac_ext_stream * stream;98 struct hdac_ext_stream *hext_stream; 99 99 100 100 list_for_each_entry_safe(s, _s, &bus->stream_list, list) { 101 stream = stream_to_hdac_ext_stream(s);102 snd_hdac_ext_stream_decouple(bus, stream, false);101 hext_stream = stream_to_hdac_ext_stream(s); 102 snd_hdac_ext_stream_decouple(bus, hext_stream, false); 103 103 list_del(&s->list); 104 kfree( stream);104 kfree(hext_stream); 105 105 } 106 106 } … … 108 108 109 109 void snd_hdac_ext_stream_decouple_locked(struct hdac_bus *bus, 110 struct hdac_ext_stream * stream,110 struct hdac_ext_stream *hext_stream, 111 111 bool decouple) 112 112 { 113 struct hdac_stream *hstream = & stream->hstream;113 struct hdac_stream *hstream = &hext_stream->hstream; 114 114 u32 val; 115 115 int mask = AZX_PPCTL_PROCEN(hstream->index); … … 122 122 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, 0); 123 123 124 stream->decoupled = decouple;124 hext_stream->decoupled = decouple; 125 125 } 126 126 EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_decouple_locked); … … 129 129 * snd_hdac_ext_stream_decouple - decouple the hdac stream 130 130 * @bus: HD-audio core bus 131 * @ stream: HD-audio ext core stream object to initialize131 * @hext_stream: HD-audio ext core stream object to initialize 132 132 * @decouple: flag to decouple 133 133 */ 134 134 void snd_hdac_ext_stream_decouple(struct hdac_bus *bus, 135 struct hdac_ext_stream * stream, bool decouple)135 struct hdac_ext_stream *hext_stream, bool decouple) 136 136 { 137 137 spin_lock_irq(&bus->reg_lock); 138 snd_hdac_ext_stream_decouple_locked(bus, stream, decouple);138 snd_hdac_ext_stream_decouple_locked(bus, hext_stream, decouple); 139 139 spin_unlock_irq(&bus->reg_lock); 140 140 } … … 143 143 /** 144 144 * snd_hdac_ext_link_stream_start - start a stream 145 * @ stream: HD-audio ext core stream to start146 */ 147 void snd_hdac_ext_link_stream_start(struct hdac_ext_stream * stream)148 { 149 snd_hdac_updatel( stream->pplc_addr, AZX_REG_PPLCCTL,145 * @hext_stream: HD-audio ext core stream to start 146 */ 147 void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hext_stream) 148 { 149 snd_hdac_updatel(hext_stream->pplc_addr, AZX_REG_PPLCCTL, 150 150 AZX_PPLCCTL_RUN, AZX_PPLCCTL_RUN); 151 151 } … … 154 154 /** 155 155 * snd_hdac_ext_link_stream_clear - stop a stream DMA 156 * @ stream: HD-audio ext core stream to stop157 */ 158 void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream * stream)159 { 160 snd_hdac_updatel( stream->pplc_addr, AZX_REG_PPLCCTL, AZX_PPLCCTL_RUN, 0);156 * @hext_stream: HD-audio ext core stream to stop 157 */ 158 void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hext_stream) 159 { 160 snd_hdac_updatel(hext_stream->pplc_addr, AZX_REG_PPLCCTL, AZX_PPLCCTL_RUN, 0); 161 161 } 162 162 EXPORT_SYMBOL_GPL(snd_hdac_ext_link_stream_clear); … … 164 164 /** 165 165 * snd_hdac_ext_link_stream_reset - reset a stream 166 * @ stream: HD-audio ext core stream to reset167 */ 168 void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream * stream)166 * @hext_stream: HD-audio ext core stream to reset 167 */ 168 void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hext_stream) 169 169 { 170 170 unsigned char val; 171 171 int timeout; 172 172 173 snd_hdac_ext_link_stream_clear( stream);174 175 snd_hdac_updatel( stream->pplc_addr, AZX_REG_PPLCCTL,173 snd_hdac_ext_link_stream_clear(hext_stream); 174 175 snd_hdac_updatel(hext_stream->pplc_addr, AZX_REG_PPLCCTL, 176 176 AZX_PPLCCTL_STRST, AZX_PPLCCTL_STRST); 177 177 udelay(3); 178 178 timeout = 50; 179 179 do { 180 val = readl( stream->pplc_addr + AZX_REG_PPLCCTL) &180 val = readl(hext_stream->pplc_addr + AZX_REG_PPLCCTL) & 181 181 AZX_PPLCCTL_STRST; 182 182 if (val) … … 185 185 } while (--timeout); 186 186 val &= ~AZX_PPLCCTL_STRST; 187 writel(val, stream->pplc_addr + AZX_REG_PPLCCTL);187 writel(val, hext_stream->pplc_addr + AZX_REG_PPLCCTL); 188 188 udelay(3); 189 189 … … 191 191 /* waiting for hardware to report that the stream is out of reset */ 192 192 do { 193 val = readl( stream->pplc_addr + AZX_REG_PPLCCTL) & AZX_PPLCCTL_STRST;193 val = readl(hext_stream->pplc_addr + AZX_REG_PPLCCTL) & AZX_PPLCCTL_STRST; 194 194 if (!val) 195 195 break; … … 202 202 /** 203 203 * snd_hdac_ext_link_stream_setup - set up the SD for streaming 204 * @ stream: HD-audio ext core stream to set up204 * @hext_stream: HD-audio ext core stream to set up 205 205 * @fmt: stream format 206 206 */ 207 int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream * stream, int fmt)208 { 209 struct hdac_stream *hstream = & stream->hstream;207 int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream *hext_stream, int fmt) 208 { 209 struct hdac_stream *hstream = &hext_stream->hstream; 210 210 unsigned int val; 211 211 212 212 /* make sure the run bit is zero for SD */ 213 snd_hdac_ext_link_stream_clear( stream);213 snd_hdac_ext_link_stream_clear(hext_stream); 214 214 /* program the stream_tag */ 215 val = readl( stream->pplc_addr + AZX_REG_PPLCCTL);215 val = readl(hext_stream->pplc_addr + AZX_REG_PPLCCTL); 216 216 val = (val & ~AZX_PPLCCTL_STRM_MASK) | 217 217 (hstream->stream_tag << AZX_PPLCCTL_STRM_SHIFT); 218 writel(val, stream->pplc_addr + AZX_REG_PPLCCTL);218 writel(val, hext_stream->pplc_addr + AZX_REG_PPLCCTL); 219 219 220 220 /* program the stream format */ 221 writew(fmt, stream->pplc_addr + AZX_REG_PPLCFMT);221 writew(fmt, hext_stream->pplc_addr + AZX_REG_PPLCFMT); 222 222 223 223 return 0; … … 231 231 */ 232 232 void snd_hdac_ext_link_set_stream_id(struct hdac_ext_link *link, 233 int stream)233 int stream) 234 234 { 235 235 snd_hdac_updatew(link->ml_addr, AZX_REG_ML_LOSIDV, (1 << stream), 1 << stream); … … 251 251 static struct hdac_ext_stream * 252 252 hdac_ext_link_stream_assign(struct hdac_bus *bus, 253 struct snd_pcm_substream *substream)253 struct snd_pcm_substream *substream) 254 254 { 255 255 struct hdac_ext_stream *res = NULL; 256 struct hdac_stream * stream = NULL;256 struct hdac_stream *hstream = NULL; 257 257 258 258 if (!bus->ppcap) { … … 262 262 263 263 spin_lock_irq(&bus->reg_lock); 264 list_for_each_entry( stream, &bus->stream_list, list) {265 struct hdac_ext_stream *h stream = container_of(stream,266 struct hdac_ext_stream,267 hstream);268 if ( stream->direction != substream->stream)264 list_for_each_entry(hstream, &bus->stream_list, list) { 265 struct hdac_ext_stream *hext_stream = container_of(hstream, 266 struct hdac_ext_stream, 267 hstream); 268 if (hstream->direction != substream->stream) 269 269 continue; 270 270 271 271 /* check if decoupled stream and not in use is available */ 272 if (h stream->decoupled && !hstream->link_locked) {273 res = h stream;272 if (hext_stream->decoupled && !hext_stream->link_locked) { 273 res = hext_stream; 274 274 break; 275 275 } 276 276 277 if (!h stream->link_locked) {278 snd_hdac_ext_stream_decouple_locked(bus, h stream, true);279 res = h stream;277 if (!hext_stream->link_locked) { 278 snd_hdac_ext_stream_decouple_locked(bus, hext_stream, true); 279 res = hext_stream; 280 280 break; 281 281 } … … 291 291 static struct hdac_ext_stream * 292 292 hdac_ext_host_stream_assign(struct hdac_bus *bus, 293 struct snd_pcm_substream *substream)293 struct snd_pcm_substream *substream) 294 294 { 295 295 struct hdac_ext_stream *res = NULL; 296 struct hdac_stream * stream = NULL;296 struct hdac_stream *hstream = NULL; 297 297 298 298 if (!bus->ppcap) { … … 302 302 303 303 spin_lock_irq(&bus->reg_lock); 304 list_for_each_entry( stream, &bus->stream_list, list) {305 struct hdac_ext_stream *h stream = container_of(stream,306 struct hdac_ext_stream,307 hstream);308 if ( stream->direction != substream->stream)304 list_for_each_entry(hstream, &bus->stream_list, list) { 305 struct hdac_ext_stream *hext_stream = container_of(hstream, 306 struct hdac_ext_stream, 307 hstream); 308 if (hstream->direction != substream->stream) 309 309 continue; 310 310 311 if (! stream->opened) {312 if (!h stream->decoupled)313 snd_hdac_ext_stream_decouple_locked(bus, h stream, true);314 res = h stream;311 if (!hstream->opened) { 312 if (!hext_stream->decoupled) 313 snd_hdac_ext_stream_decouple_locked(bus, hext_stream, true); 314 res = hext_stream; 315 315 break; 316 316 } … … 347 347 int type) 348 348 { 349 struct hdac_ext_stream *h stream = NULL;350 struct hdac_stream * stream = NULL;349 struct hdac_ext_stream *hext_stream = NULL; 350 struct hdac_stream *hstream = NULL; 351 351 352 352 switch (type) { 353 353 case HDAC_EXT_STREAM_TYPE_COUPLED: 354 stream = snd_hdac_stream_assign(bus, substream); 355 if (stream) 356 hstream = container_of(stream, 357 struct hdac_ext_stream, hstream); 358 return hstream; 354 hstream = snd_hdac_stream_assign(bus, substream); 355 if (hstream) 356 hext_stream = container_of(hstream, 357 struct hdac_ext_stream, 358 hstream); 359 return hext_stream; 359 360 360 361 case HDAC_EXT_STREAM_TYPE_HOST: … … 372 373 /** 373 374 * snd_hdac_ext_stream_release - release the assigned stream 374 * @ stream: HD-audio ext core stream to release375 * @hext_stream: HD-audio ext core stream to release 375 376 * @type: type of stream (coupled, host or link stream) 376 377 * 377 378 * Release the stream that has been assigned by snd_hdac_ext_stream_assign(). 378 379 */ 379 void snd_hdac_ext_stream_release(struct hdac_ext_stream * stream, int type)380 { 381 struct hdac_bus *bus = stream->hstream.bus;380 void snd_hdac_ext_stream_release(struct hdac_ext_stream *hext_stream, int type) 381 { 382 struct hdac_bus *bus = hext_stream->hstream.bus; 382 383 383 384 switch (type) { 384 385 case HDAC_EXT_STREAM_TYPE_COUPLED: 385 snd_hdac_stream_release(& stream->hstream);386 snd_hdac_stream_release(&hext_stream->hstream); 386 387 break; 387 388 388 389 case HDAC_EXT_STREAM_TYPE_HOST: 389 390 spin_lock_irq(&bus->reg_lock); 390 if ( stream->decoupled && !stream->link_locked)391 snd_hdac_ext_stream_decouple_locked(bus, stream, false);391 if (hext_stream->decoupled && !hext_stream->link_locked) 392 snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false); 392 393 spin_unlock_irq(&bus->reg_lock); 393 snd_hdac_stream_release(& stream->hstream);394 snd_hdac_stream_release(&hext_stream->hstream); 394 395 break; 395 396 396 397 case HDAC_EXT_STREAM_TYPE_LINK: 397 398 spin_lock_irq(&bus->reg_lock); 398 if ( stream->decoupled && !stream->hstream.opened)399 snd_hdac_ext_stream_decouple_locked(bus, stream, false);400 stream->link_locked = 0;401 stream->link_substream = NULL;399 if (hext_stream->decoupled && !hext_stream->hstream.opened) 400 snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false); 401 hext_stream->link_locked = 0; 402 hext_stream->link_substream = NULL; 402 403 spin_unlock_irq(&bus->reg_lock); 403 404 break; … … 438 439 * snd_hdac_ext_stream_set_spib - sets the spib value of a stream 439 440 * @bus: HD-audio core bus 440 * @ stream: hdac_ext_stream441 * @hext_stream: hdac_ext_stream 441 442 * @value: spib value to set 442 443 */ 443 444 int snd_hdac_ext_stream_set_spib(struct hdac_bus *bus, 444 struct hdac_ext_stream * stream, u32 value)445 struct hdac_ext_stream *hext_stream, u32 value) 445 446 { 446 447 … … 450 451 } 451 452 452 writel(value, stream->spib_addr);453 writel(value, hext_stream->spib_addr); 453 454 454 455 return 0; … … 459 460 * snd_hdac_ext_stream_get_spbmaxfifo - gets the spib value of a stream 460 461 * @bus: HD-audio core bus 461 * @ stream: hdac_ext_stream462 * @hext_stream: hdac_ext_stream 462 463 * 463 464 * Return maxfifo for the stream 464 465 */ 465 466 int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_bus *bus, 466 struct hdac_ext_stream * stream)467 struct hdac_ext_stream *hext_stream) 467 468 { 468 469 … … 472 473 } 473 474 474 return readl( stream->fifo_addr);475 return readl(hext_stream->fifo_addr); 475 476 } 476 477 EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_get_spbmaxfifo); 477 478 479 /**480 * snd_hdac_ext_stop_streams - stop all stream if running481 * @bus: HD-audio core bus482 */483 void snd_hdac_ext_stop_streams(struct hdac_bus *bus)484 {485 struct hdac_stream *stream;486 487 if (bus->chip_init) {488 list_for_each_entry(stream, &bus->stream_list, list)489 snd_hdac_stream_stop(stream);490 snd_hdac_bus_stop_chip(bus);491 }492 }493 EXPORT_SYMBOL_GPL(snd_hdac_ext_stop_streams);494 478 495 479 /** … … 521 505 * snd_hdac_ext_stream_set_dpibr - sets the dpibr value of a stream 522 506 * @bus: HD-audio core bus 523 * @ stream: hdac_ext_stream507 * @hext_stream: hdac_ext_stream 524 508 * @value: dpib value to set 525 509 */ 526 510 int snd_hdac_ext_stream_set_dpibr(struct hdac_bus *bus, 527 struct hdac_ext_stream *stream, u32 value)511 struct hdac_ext_stream *hext_stream, u32 value) 528 512 { 529 513 … … 533 517 } 534 518 535 writel(value, stream->dpibr_addr);519 writel(value, hext_stream->dpibr_addr); 536 520 537 521 return 0; … … 541 525 /** 542 526 * snd_hdac_ext_stream_set_lpib - sets the lpib value of a stream 543 * @ stream: hdac_ext_stream527 * @hext_stream: hdac_ext_stream 544 528 * @value: lpib value to set 545 529 */ 546 int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream * stream, u32 value)547 { 548 snd_hdac_stream_writel(& stream->hstream, SD_LPIB, value);530 int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *hext_stream, u32 value) 531 { 532 snd_hdac_stream_writel(&hext_stream->hstream, SD_LPIB, value); 549 533 550 534 return 0; -
GPL/branches/uniaud32-exp/alsa-kernel/hda/hdac_stream.c
r711 r737 147 147 } 148 148 EXPORT_SYMBOL_GPL(snd_hdac_stream_stop); 149 150 /** 151 * snd_hdac_stop_streams_and_chip - stop all streams and chip if running 152 * @bus: HD-audio core bus 153 */ 154 void snd_hdac_stop_streams_and_chip(struct hdac_bus *bus) 155 { 156 struct hdac_stream *stream; 157 158 if (bus->chip_init) { 159 list_for_each_entry(stream, &bus->stream_list, list, struct hdac_stream) 160 snd_hdac_stream_stop(stream); 161 snd_hdac_bus_stop_chip(bus); 162 } 163 } 164 EXPORT_SYMBOL_GPL(snd_hdac_stop_streams_and_chip); 149 165 150 166 /** -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/config.h
r730 r737 36 36 #define CONFIG_SND_HDA_CODEC_SI3054 37 37 #define CONFIG_SND_HDA_CODEC_VIA 38 #define CONFIG_SND_HDA_COMPONENT 38 39 #define CONFIG_SND_HDA_GENERIC 39 40 #define CONFIG_SND_HDA_HWDEP -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/core.h
r736 r737 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); 290 291 void snd_card_set_id(struct snd_card *card, const char *id); 291 292 int snd_card_register(struct snd_card *card); -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/dmaengine_pcm.h
r693 r737 61 61 * src_addr_width member, not bytes) that can be send to or received from the 62 62 * DAI in one burst. 63 * @slave_id: Slave requester id for the DMA channel.64 63 * @filter_data: Custom DMA channel filter data, this will usually be used when 65 64 * requesting the DMA channel. … … 75 74 enum dma_slave_buswidth addr_width; 76 75 u32 maxburst; 77 unsigned int slave_id;78 76 void *filter_data; 79 77 const char *chan_name; -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hdaudio.h
r693 r737 573 573 void snd_hdac_stream_clear(struct hdac_stream *azx_dev); 574 574 void snd_hdac_stream_stop(struct hdac_stream *azx_dev); 575 void snd_hdac_stop_streams_and_chip(struct hdac_bus *bus); 575 576 void snd_hdac_stream_reset(struct hdac_stream *azx_dev); 576 577 void snd_hdac_stream_sync_trigger(struct hdac_stream *azx_dev, bool set, -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hdaudio_ext.h
r711 r737 79 79 80 80 void snd_hdac_ext_stream_init(struct hdac_bus *bus, 81 struct hdac_ext_stream *stream, int idx,82 int direction, int tag);81 struct hdac_ext_stream *hext_stream, int idx, 82 int direction, int tag); 83 83 int snd_hdac_ext_stream_init_all(struct hdac_bus *bus, int start_idx, 84 int num_stream, int dir);84 int num_stream, int dir); 85 85 void snd_hdac_stream_free_all(struct hdac_bus *bus); 86 86 void snd_hdac_link_free_all(struct hdac_bus *bus); … … 88 88 struct snd_pcm_substream *substream, 89 89 int type); 90 void snd_hdac_ext_stream_release(struct hdac_ext_stream * azx_dev, int type);90 void snd_hdac_ext_stream_release(struct hdac_ext_stream *hext_stream, int type); 91 91 void snd_hdac_ext_stream_decouple_locked(struct hdac_bus *bus, 92 struct hdac_ext_stream *azx_dev, bool decouple);92 struct hdac_ext_stream *hext_stream, bool decouple); 93 93 void snd_hdac_ext_stream_decouple(struct hdac_bus *bus, 94 94 struct hdac_ext_stream *azx_dev, bool decouple); 95 void snd_hdac_ext_stop_streams(struct hdac_bus *bus);96 95 97 96 int snd_hdac_ext_stream_set_spib(struct hdac_bus *bus, 98 struct hdac_ext_stream * stream, u32 value);97 struct hdac_ext_stream *hext_stream, u32 value); 99 98 int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_bus *bus, 100 struct hdac_ext_stream *stream);99 struct hdac_ext_stream *hext_stream); 101 100 void snd_hdac_ext_stream_drsm_enable(struct hdac_bus *bus, 102 101 bool enable, int index); 103 102 int snd_hdac_ext_stream_set_dpibr(struct hdac_bus *bus, 104 struct hdac_ext_stream * stream, u32 value);105 int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream * stream, u32 value);103 struct hdac_ext_stream *hext_stream, u32 value); 104 int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *hext_stream, u32 value); 106 105 107 void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *h stream);108 void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *h stream);109 void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *h stream);110 int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream * stream, int fmt);106 void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hext_stream); 107 void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hext_stream); 108 void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hext_stream); 109 int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream *hext_stream, int fmt); 111 110 112 111 struct hdac_ext_link { -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/intel-nhlt.h
r682 r737 10 10 11 11 #include <linux/acpi.h> 12 13 enum nhlt_link_type { 14 NHLT_LINK_HDA = 0, 15 NHLT_LINK_DSP = 1, 16 NHLT_LINK_DMIC = 2, 17 NHLT_LINK_SSP = 3, 18 NHLT_LINK_INVALID 19 }; 20 21 enum nhlt_device_type { 22 NHLT_DEVICE_BT = 0, 23 NHLT_DEVICE_DMIC = 1, 24 NHLT_DEVICE_I2S = 4, 25 NHLT_DEVICE_INVALID 26 }; 12 27 13 28 #if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_SND_INTEL_NHLT) … … 33 48 u8 sub_fmt[16]; 34 49 } __packed; 35 36 enum nhlt_link_type {37 NHLT_LINK_HDA = 0,38 NHLT_LINK_DSP = 1,39 NHLT_LINK_DMIC = 2,40 NHLT_LINK_SSP = 3,41 NHLT_LINK_INVALID42 };43 44 enum nhlt_device_type {45 NHLT_DEVICE_BT = 0,46 NHLT_DEVICE_DMIC = 1,47 NHLT_DEVICE_I2S = 4,48 NHLT_DEVICE_INVALID49 };50 50 51 51 struct nhlt_specific_cfg { … … 133 133 int intel_nhlt_get_dmic_geo(struct device *dev, struct nhlt_acpi_table *nhlt); 134 134 135 bool intel_nhlt_has_endpoint_type(struct nhlt_acpi_table *nhlt, u8 link_type); 136 137 int intel_nhlt_ssp_endpoint_mask(struct nhlt_acpi_table *nhlt, u8 device_type); 138 139 struct nhlt_specific_cfg * 140 intel_nhlt_get_endpoint_blob(struct device *dev, struct nhlt_acpi_table *nhlt, 141 u32 bus_id, u8 link_type, u8 vbps, u8 bps, 142 u8 num_ch, u32 rate, u8 dir, u8 dev_type); 143 135 144 #else 136 145 … … 151 160 return 0; 152 161 } 162 163 static inline bool intel_nhlt_has_endpoint_type(struct nhlt_acpi_table *nhlt, 164 u8 link_type) 165 { 166 return false; 167 } 168 169 static inline int intel_nhlt_ssp_endpoint_mask(struct nhlt_acpi_table *nhlt, u8 device_type) 170 { 171 return 0; 172 } 173 174 static inline struct nhlt_specific_cfg * 175 intel_nhlt_get_endpoint_blob(struct device *dev, struct nhlt_acpi_table *nhlt, 176 u32 bus_id, u8 link_type, u8 vbps, u8 bps, 177 u8 num_ch, u32 rate, u8 dir, u8 dev_type) 178 { 179 return NULL; 180 } 181 153 182 #endif 154 183 -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/jack.h
r736 r737 63 63 #ifdef CONFIG_SND_JACK_INPUT_DEV 64 64 struct input_dev *input_dev; 65 struct mutex input_dev_lock; 65 66 int registered; 66 67 int type; -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/memalloc.h
r736 r737 37 37 #define SNDRV_DMA_TYPE_DEV 2 /* generic device continuous */ 38 38 #define SNDRV_DMA_TYPE_DEV_WC 5 /* continuous write-combined */ 39 #ifdef CONFIG_SND_DMA_SGBUF40 #define SNDRV_DMA_TYPE_DEV_SG 3 /* generic device SG-buffer */41 #define SNDRV_DMA_TYPE_DEV_WC_SG 6 /* SG write-combined */42 #else43 #define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_DEV /* no SG-buf support */44 #define SNDRV_DMA_TYPE_DEV_WC_SG SNDRV_DMA_TYPE_DEV_WC45 #endif46 39 #ifdef CONFIG_GENERIC_ALLOCATOR 47 40 #define SNDRV_DMA_TYPE_DEV_IRAM 4 /* generic device iram-buffer */ … … 52 45 #define SNDRV_DMA_TYPE_NONCONTIG 8 /* non-coherent SG buffer */ 53 46 #define SNDRV_DMA_TYPE_NONCOHERENT 9 /* non-coherent buffer */ 47 #ifdef CONFIG_SND_DMA_SGBUF 48 #define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_NONCONTIG 49 #define SNDRV_DMA_TYPE_DEV_WC_SG 6 /* SG write-combined */ 50 #else 51 #define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_DEV /* no SG-buf support */ 52 #define SNDRV_DMA_TYPE_DEV_WC_SG SNDRV_DMA_TYPE_DEV_WC 53 #endif 54 /* fallback types, don't use those directly */ 55 #ifdef CONFIG_SND_DMA_SGBUF 56 #define SNDRV_DMA_TYPE_DEV_SG_FALLBACK 10 57 #define SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK 11 58 #endif 54 59 55 60 /* -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/pcm.h
r711 r737 148 148 #define SNDRV_PCM_FMTBIT_U24_LE _SNDRV_PCM_FMTBIT(U24_LE) 149 149 #define SNDRV_PCM_FMTBIT_U24_BE _SNDRV_PCM_FMTBIT(U24_BE) 150 // For S32/U32 formats, 'msbits' hardware parameter is often used to deliver information about the 151 // available bit count in most significant bit. It's for the case of so-called 'left-justified' or 152 // `right-padding` sample which has less width than 32 bit. 150 153 #define SNDRV_PCM_FMTBIT_S32_LE _SNDRV_PCM_FMTBIT(S32_LE) 151 154 #define SNDRV_PCM_FMTBIT_S32_BE _SNDRV_PCM_FMTBIT(S32_BE) … … 617 620 void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream); 618 621 unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream); 622 unsigned long _snd_pcm_stream_lock_irqsave_nested(struct snd_pcm_substream *substream); 619 623 620 624 /** … … 641 645 void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream, 642 646 unsigned long flags); 647 648 /** 649 * snd_pcm_stream_lock_irqsave_nested - Single-nested PCM stream locking 650 * @substream: PCM substream 651 * @flags: irq flags 652 * 653 * This locks the PCM stream like snd_pcm_stream_lock_irqsave() but with 654 * the single-depth lockdep subclass. 655 */ 656 #define snd_pcm_stream_lock_irqsave_nested(substream, flags) \ 657 do { \ 658 typecheck(unsigned long, flags); \ 659 flags = _snd_pcm_stream_lock_irqsave_nested(substream); \ 660 } while (0) 643 661 644 662 /** -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-component.h
r736 r737 149 149 int (*ack)(struct snd_soc_component *component, 150 150 struct snd_pcm_substream *substream); 151 snd_pcm_sframes_t (*delay)(struct snd_soc_component *component, 152 struct snd_pcm_substream *substream); 151 153 152 154 const struct snd_compress_ops *compress_ops; … … 506 508 void *stream, int rollback); 507 509 int snd_soc_pcm_component_ack(struct snd_pcm_substream *substream); 510 void snd_soc_pcm_component_delay(struct snd_pcm_substream *substream, 511 snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay); 508 512 509 513 #endif /* __SOC_COMPONENT_H */ -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-dai.h
r697 r737 209 209 void snd_soc_dai_shutdown(struct snd_soc_dai *dai, 210 210 struct snd_pcm_substream *substream, int rollback); 211 snd_pcm_sframes_t snd_soc_dai_delay(struct snd_soc_dai *dai,212 struct snd_pcm_substream *substream);213 211 void snd_soc_dai_suspend(struct snd_soc_dai *dai); 214 212 void snd_soc_dai_resume(struct snd_soc_dai *dai); … … 239 237 int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream, 240 238 int cmd); 239 void snd_soc_pcm_dai_delay(struct snd_pcm_substream *substream, 240 snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay); 241 241 242 242 int snd_soc_dai_compr_startup(struct snd_soc_dai *dai, … … 296 296 int (*set_tristate)(struct snd_soc_dai *dai, int tristate); 297 297 298 int (*set_s dw_stream)(struct snd_soc_dai *dai,299 void *stream, int direction);300 void *(*get_s dw_stream)(struct snd_soc_dai *dai, int direction);298 int (*set_stream)(struct snd_soc_dai *dai, 299 void *stream, int direction); 300 void *(*get_stream)(struct snd_soc_dai *dai, int direction); 301 301 302 302 /* … … 516 516 517 517 /** 518 * snd_soc_dai_set_s dw_stream() - Configures a DAI for SDWstream operation518 * snd_soc_dai_set_stream() - Configures a DAI for stream operation 519 519 * @dai: DAI 520 * @stream: STREAM 520 * @stream: STREAM (opaque structure depending on DAI type) 521 521 * @direction: Stream direction(Playback/Capture) 522 * So undWire subsystem doesn't have a notion of direction and we reuse522 * Some subsystems, such as SoundWire, don't have a notion of direction and we reuse 523 523 * the ASoC stream direction to configure sink/source ports. 524 524 * Playback maps to source ports and Capture for sink ports. … … 527 527 * Returns 0 on success, a negative error code otherwise. 528 528 */ 529 static inline int snd_soc_dai_set_s dw_stream(struct snd_soc_dai *dai,530 void *stream, int direction)531 { 532 if (dai->driver->ops->set_s dw_stream)533 return dai->driver->ops->set_s dw_stream(dai, stream, direction);529 static inline int snd_soc_dai_set_stream(struct snd_soc_dai *dai, 530 void *stream, int direction) 531 { 532 if (dai->driver->ops->set_stream) 533 return dai->driver->ops->set_stream(dai, stream, direction); 534 534 else 535 535 return -ENOTSUPP; … … 537 537 538 538 /** 539 * snd_soc_dai_get_s dw_stream() - Retrieves SDWstream from DAI539 * snd_soc_dai_get_stream() - Retrieves stream from DAI 540 540 * @dai: DAI 541 541 * @direction: Stream direction(Playback/Capture) 542 542 * 543 543 * This routine only retrieves that was previously configured 544 * with snd_soc_dai_get_s dw_stream()544 * with snd_soc_dai_get_stream() 545 545 * 546 546 * Returns pointer to stream or an ERR_PTR value, e.g. 547 547 * ERR_PTR(-ENOTSUPP) if callback is not supported; 548 548 */ 549 static inline void *snd_soc_dai_get_s dw_stream(struct snd_soc_dai *dai,550 int direction)551 { 552 if (dai->driver->ops->get_s dw_stream)553 return dai->driver->ops->get_s dw_stream(dai, direction);549 static inline void *snd_soc_dai_get_stream(struct snd_soc_dai *dai, 550 int direction) 551 { 552 if (dai->driver->ops->get_stream) 553 return dai->driver->ops->get_stream(dai, direction); 554 554 else 555 555 return ERR_PTR(-ENOTSUPP); -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-dpcm.h
r736 r737 102 102 103 103 int trigger_pending; /* trigger cmd + 1 if pending, 0 if not */ 104 105 int be_start; /* refcount protected by BE stream pcm lock */ 104 106 }; 105 107 -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc.h
r697 r737 894 894 enum snd_soc_pcm_subclass pcm_subclass; 895 895 896 spinlock_t dpcm_lock;897 898 896 int (*probe)(struct snd_soc_card *card); 899 897 int (*late_probe)(struct snd_soc_card *card); … … 1214 1212 int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, 1215 1213 const char *propname); 1214 int snd_soc_of_parse_pin_switches(struct snd_soc_card *card, const char *prop); 1216 1215 int snd_soc_of_get_slot_mask(struct device_node *np, 1217 1216 const char *prop_name, -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/sof.h
r736 r737 17 17 18 18 struct snd_sof_dsp_ops; 19 20 /** 21 * enum sof_fw_state - DSP firmware state definitions 22 * @SOF_FW_BOOT_NOT_STARTED: firmware boot is not yet started 23 * @SOF_FW_BOOT_PREPARE: preparing for boot (firmware loading for exaqmple) 24 * @SOF_FW_BOOT_IN_PROGRESS: firmware boot is in progress 25 * @SOF_FW_BOOT_FAILED: firmware boot failed 26 * @SOF_FW_BOOT_READY_FAILED: firmware booted but fw_ready op failed 27 * @SOF_FW_BOOT_READY_OK: firmware booted and fw_ready op passed 28 * @SOF_FW_BOOT_COMPLETE: firmware is booted up and functional 29 * @SOF_FW_CRASHED: firmware crashed after successful boot 30 */ 31 enum sof_fw_state { 32 SOF_FW_BOOT_NOT_STARTED = 0, 33 SOF_FW_BOOT_PREPARE, 34 SOF_FW_BOOT_IN_PROGRESS, 35 SOF_FW_BOOT_FAILED, 36 SOF_FW_BOOT_READY_FAILED, 37 SOF_FW_BOOT_READY_OK, 38 SOF_FW_BOOT_COMPLETE, 39 SOF_FW_CRASHED, 40 }; 19 41 20 42 /* -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/version.h
r736 r737 1 1 /* include/version.h */ 2 #define CONFIG_SND_VERSION "5.1 6.20"2 #define CONFIG_SND_VERSION "5.17.15" 3 3 #define CONFIG_SND_DATE "" -
GPL/branches/uniaud32-exp/alsa-kernel/include/uapi/sound/asound.h
r736 r737 229 229 #define SNDRV_PCM_FORMAT_U24_LE ((__force snd_pcm_format_t) 8) /* low three bytes */ 230 230 #define SNDRV_PCM_FORMAT_U24_BE ((__force snd_pcm_format_t) 9) /* low three bytes */ 231 /* 232 * For S32/U32 formats, 'msbits' hardware parameter is often used to deliver information about the 233 * available bit count in most significant bit. It's for the case of so-called 'left-justified' or 234 * `right-padding` sample which has less width than 32 bit. 235 */ 231 236 #define SNDRV_PCM_FORMAT_S32_LE ((__force snd_pcm_format_t) 10) 232 237 #define SNDRV_PCM_FORMAT_S32_BE ((__force snd_pcm_format_t) 11) … … 327 332 #define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 /* report synchronized audio/system time */ 328 333 #define SNDRV_PCM_INFO_EXPLICIT_SYNC 0x10000000 /* needs explicit sync of pointers and data */ 329 334 #define SNDRV_PCM_INFO_NO_REWINDS 0x20000000 /* hardware can only support monotonic changes of appl_ptr */ 330 335 #define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */ 331 336 #define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */ -
GPL/branches/uniaud32-exp/alsa-kernel/pci/ac97/ac97_pcm.c
r629 r737 232 232 * for SPDIF). 233 233 * 234 * The valid registers are AC97_P MC_MIC_ADC_RATE,234 * The valid registers are AC97_PCM_MIC_ADC_RATE, 235 235 * AC97_PCM_FRONT_DAC_RATE, AC97_PCM_LR_ADC_RATE. 236 236 * AC97_PCM_SURR_DAC_RATE and AC97_PCM_LFE_DAC_RATE are accepted -
GPL/branches/uniaud32-exp/alsa-kernel/pci/ali5451/ali5451.c
r736 r737 2132 2132 } 2133 2133 2134 static int snd_ali_probe(struct pci_dev *pci,2135 const struct pci_device_id *pci_id)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)); 2178 2184 } 2179 2185 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/als4000.c
r736 r737 810 810 } 811 811 812 static int snd_card_als4000_probe(struct pci_dev *pci,813 const struct pci_device_id *pci_id)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 936 942 #ifdef CONFIG_PM_SLEEP 937 943 static int snd_als4000_suspend(struct device *dev) -
GPL/branches/uniaud32-exp/alsa-kernel/pci/atiixp.c
r736 r737 1595 1595 1596 1596 1597 static int snd_atiixp_probe(struct pci_dev *pci,1598 const struct pci_device_id *pci_id)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 1652 1658 static struct pci_driver atiixp_driver = { 1653 1659 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/au88x0/au88x0.c
r736 r737 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 int 314 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 313 319 // pci_driver definition 314 320 static struct pci_driver vortex_driver = { -
GPL/branches/uniaud32-exp/alsa-kernel/pci/bt87x.c
r736 r737 824 824 } 825 825 826 static int snd_bt87x_probe(struct pci_dev *pci,827 const struct pci_device_id *pci_id)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 910 916 /* default entries for all Bt87x cards - it's not exported */ 911 917 /* driver_data is set to 0 to call detection */ -
GPL/branches/uniaud32-exp/alsa-kernel/pci/ca0106/ca0106_main.c
r736 r737 1729 1729 1730 1730 1731 static int snd_ca0106_probe(struct pci_dev *pci,1732 const struct pci_device_id *pci_id)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)); 1790 1796 } 1791 1797 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/cmipci.c
r736 r737 3268 3268 err = snd_cmipci_create(card, pci, dev); 3269 3269 if (err < 0) 3270 return err;3270 goto error; 3271 3271 3272 3272 err = snd_card_register(card); 3273 3273 if (err < 0) 3274 return err;3274 goto error; 3275 3275 3276 3276 pci_set_drvdata(pci, card); 3277 3277 dev++; 3278 3278 return 0; 3279 3280 error: 3281 snd_card_free(card); 3282 return err; 3279 3283 } 3280 3284 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/cs4281.c
r736 r737 1844 1844 } 1845 1845 1846 static int snd_cs4281_probe(struct pci_dev *pci,1847 const struct pci_device_id *pci_id)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 1907 1913 /* 1908 1914 * Power Management -
GPL/branches/uniaud32-exp/alsa-kernel/pci/cs5535audio/cs5535audio.c
r736 r737 286 286 } 287 287 288 static int snd_cs5535audio_probe(struct pci_dev *pci,289 const struct pci_device_id *pci_id)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)); 336 342 } 337 343 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/emu10k1/emu10k1x.c
r736 r737 1499 1499 } 1500 1500 1501 static int snd_emu10k1x_probe(struct pci_dev *pci,1502 const struct pci_device_id *pci_id)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 1564 1570 // PCI IDs 1565 1571 static const struct pci_device_id snd_emu10k1x_ids[] = { -
GPL/branches/uniaud32-exp/alsa-kernel/pci/ens1370.c
r736 r737 2320 2320 } 2321 2321 2322 static int snd_audiopci_probe(struct pci_dev *pci,2323 const struct pci_device_id *pci_id)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 2387 2393 static struct pci_driver ens137x_driver = { 2388 2394 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/es1938.c
r736 r737 1752 1752 1753 1753 1754 static int snd_es1938_probe(struct pci_dev *pci,1755 const struct pci_device_id *pci_id)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 1834 1840 static struct pci_driver es1938_driver = { 1835 1841 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/es1968.c
r736 r737 2778 2778 /* 2779 2779 */ 2780 static int snd_es1968_probe(struct pci_dev *pci,2781 const struct pci_device_id *pci_id)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 2887 2893 static struct pci_driver es1968_driver = { 2888 2894 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/fm801.c
r736 r737 1292 1292 } 1293 1293 1294 static int snd_card_fm801_probe(struct pci_dev *pci,1295 const struct pci_device_id *pci_id)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)); 1357 1363 } 1358 1364 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_auto_parser.c
r736 r737 88 88 } 89 89 90 #ifdef TARGET_OS2 91 /** 92 * swap - swap values of @a and @b 93 * @a: first value 94 * @b: second value 95 */ 96 #define swap(a, b) \ 97 do { u16 __tmp = (a); (a) = (b); (b) = __tmp; } while (0) 98 #endif 90 99 /* Reorder the surround channels 91 100 * ALSA sequence is front/surr/clfe/side … … 97 106 static void reorder_outputs(unsigned int nums, hda_nid_t *pins) 98 107 { 99 hda_nid_t nid;100 101 108 switch (nums) { 102 109 case 3: 103 110 case 4: 104 nid = pins[1]; 105 pins[1] = pins[2]; 106 pins[2] = nid; 111 swap(pins[1], pins[2]); 107 112 break; 108 113 } -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_bind.c
r733 r737 15 15 #include <sound/hda_codec.h> 16 16 #include "hda_local.h" 17 #include "hda_jack.h" 17 18 18 19 #pragma disable_message (201) … … 161 162 refcount_dec(&codec->pcm_ref); 162 163 snd_hda_codec_disconnect_pcms(codec); 164 snd_hda_jack_tbl_disconnect(codec); 163 165 wait_event(codec->remove_sleep, !refcount_read(&codec->pcm_ref)); 164 166 snd_power_sync_ref(codec->bus->card); -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_generic.h
r711 r737 184 184 185 185 /* for pin sensing */ 186 /* current status; set in hda_gene ic.c */186 /* current status; set in hda_generic.c */ 187 187 unsigned int hp_jack_present:1; 188 188 unsigned int line_jack_present:1; -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_intel.c
r736 r737 1382 1382 return; 1383 1383 1384 if (azx_has_pm_runtime(chip) && chip->running) 1384 if (azx_has_pm_runtime(chip) && chip->running) { 1385 1385 pm_runtime_get_noresume(&pci->dev); 1386 pm_runtime_forbid(&pci->dev); 1387 pm_runtime_dont_use_autosuspend(&pci->dev); 1388 } 1389 1386 1390 chip->running = 0; 1387 1391 … … 1978 1982 if (dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(dma_bits))) 1979 1983 dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(32)); 1984 dma_set_max_seg_size(&pci->dev, UINT_MAX); 1980 1985 1981 1986 /* read number of streams from GCAP register instead of using … … 2543 2548 { PCI_DEVICE(0x8086, 0x51c8), 2544 2549 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2550 { PCI_DEVICE(0x8086, 0x51cd), 2551 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2545 2552 /* Alderlake-M */ 2546 2553 { PCI_DEVICE(0x8086, 0x51cc), 2554 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2555 /* Alderlake-N */ 2556 { PCI_DEVICE(0x8086, 0x54c8), 2547 2557 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2548 2558 /* Elkhart Lake */ -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_jack.c
r694 r737 157 157 158 158 return jack; 159 } 160 161 void snd_hda_jack_tbl_disconnect(struct hda_codec *codec) 162 { 163 struct hda_jack_tbl *jack = codec->jacktbl.list; 164 int i; 165 166 for (i = 0; i < codec->jacktbl.used; i++, jack++) { 167 if (!codec->bus->shutdown && jack->jack) 168 snd_device_disconnect(codec->card, jack->jack); 169 } 159 170 } 160 171 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_jack.h
r694 r737 70 70 unsigned char tag, int dev_id); 71 71 72 void snd_hda_jack_tbl_disconnect(struct hda_codec *codec); 72 73 void snd_hda_jack_tbl_clear(struct hda_codec *codec); 73 74 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_conexant.c
r736 r737 1113 1113 cxt5051_fixups, cxt_fixups); 1114 1114 break; 1115 case 0x14f15098: 1116 codec->pin_amp_workaround = 1; 1117 spec->gen.mixer_nid = 0x22; 1118 spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; 1119 snd_hda_pick_fixup(codec, cxt5066_fixup_models, 1120 cxt5066_fixups, cxt_fixups); 1121 break; 1115 1122 case 0x14f150f2: 1116 1123 codec->power_save_node = 1; -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_hdmi.c
r736 r737 1400 1400 last_try: 1401 1401 /* the last try; check the empty slots in pins */ 1402 for (i = 0; i < spec-> num_nids; i++) {1402 for (i = 0; i < spec->pcm_used; i++) { 1403 1403 if (!test_bit(i, &spec->pcm_bitmap)) 1404 1404 return i; … … 1548 1548 } 1549 1549 1550 if (!eld->eld_valid || eld->eld_size <= 0 ) {1550 if (!eld->eld_valid || eld->eld_size <= 0 || eld->info.sad_count <= 0) { 1551 1551 eld->eld_valid = false; 1552 1552 eld->eld_size = 0; … … 2276 2276 */ 2277 2277 2278 if (codec->mst_no_extra_pcms) 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) 2279 2281 pcm_num = spec->num_nids; 2280 2282 else -
GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_realtek.c
r736 r737 26 26 #include "hda_jack.h" 27 27 #include "hda_generic.h" 28 #ifndef TARGET_OS2 29 #include "hda_component.h" 30 #else 31 #include "hda_component2.h" 32 #endif 28 33 29 34 #ifdef TARGET_OS2 … … 133 138 struct input_dev *kb_dev; 134 139 u8 alc_mute_keycode_map[1]; 140 141 /* component binding */ 142 struct component_match *match; 143 struct hda_component comps[HDA_MAX_COMPONENTS]; 135 144 }; 136 145 … … 941 950 } 942 951 952 #define alc_free snd_hda_gen_free 953 954 #ifdef CONFIG_PM 943 955 static inline void alc_shutup(struct hda_codec *codec) 944 956 { … … 954 966 } 955 967 956 #define alc_free snd_hda_gen_free957 958 #ifdef CONFIG_PM959 968 static void alc_power_eapd(struct hda_codec *codec) 960 969 { … … 970 979 return 0; 971 980 } 972 #endif 973 974 #ifdef CONFIG_PM 981 975 982 static int alc_resume(struct hda_codec *codec) 976 983 { … … 2339 2346 ALC887_FIXUP_ASUS_AUDIO, 2340 2347 ALC887_FIXUP_ASUS_HMIC, 2348 ALCS1200A_FIXUP_MIC_VREF, 2341 2349 }; 2342 2350 … … 3072 3080 .chain_id = ALC887_FIXUP_ASUS_AUDIO, 3073 3081 }, 3082 #ifdef TARGET_OS2xxx 3083 [ALCS1200A_FIXUP_MIC_VREF] = { 3084 .type = HDA_FIXUP_PINCTLS, 3085 .v.pins = (const struct hda_pintbl[]) { 3086 { 0x18, PIN_VREF50 }, /* rear mic */ 3087 { 0x19, PIN_VREF50 }, /* front mic */ 3088 {} 3089 } 3090 }, 3091 #endif 3074 3092 }; 3075 3093 … … 3109 3127 SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS), 3110 3128 SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3), 3129 SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF), 3111 3130 SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), 3112 3131 SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP), … … 3163 3182 SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3164 3183 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3184 SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3165 3185 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3166 3186 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), … … 3769 3789 ALC269_TYPE_ALC215, 3770 3790 ALC269_TYPE_ALC225, 3791 ALC269_TYPE_ALC245, 3771 3792 ALC269_TYPE_ALC287, 3772 3793 ALC269_TYPE_ALC294, … … 3806 3827 case ALC269_TYPE_ALC215: 3807 3828 case ALC269_TYPE_ALC225: 3829 case ALC269_TYPE_ALC245: 3808 3830 case ALC269_TYPE_ALC287: 3809 3831 case ALC269_TYPE_ALC294: … … 4335 4357 bool hp1_pin_sense, hp2_pin_sense; 4336 4358 4337 if (spec->codec_variant != ALC269_TYPE_ALC287) 4359 if (spec->codec_variant != ALC269_TYPE_ALC287 && 4360 spec->codec_variant != ALC269_TYPE_ALC245) 4338 4361 /* required only at boot or S3 and S4 resume time */ 4339 4362 #ifndef TARGET_OS2 … … 7272 7295 } 7273 7296 7297 static int comp_match_dev_name(struct device *dev, void *data) 7298 { 7299 return strcmp(dev_name(dev), data) == 0; 7300 } 7301 7302 static int find_comp_by_dev_name(struct alc_spec *spec, const char *name) 7303 { 7304 int i; 7305 7306 for (i = 0; i < HDA_MAX_COMPONENTS; i++) { 7307 if (strcmp(spec->comps[i].name, name) == 0) 7308 return i; 7309 } 7310 7311 return -ENODEV; 7312 } 7313 7314 static int comp_bind(struct device *dev) 7315 { 7316 struct hda_codec *cdc = dev_to_hda_codec(dev); 7317 struct alc_spec *spec = cdc->spec; 7318 7319 return component_bind_all(dev, spec->comps); 7320 } 7321 7322 static void comp_unbind(struct device *dev) 7323 { 7324 struct hda_codec *cdc = dev_to_hda_codec(dev); 7325 struct alc_spec *spec = cdc->spec; 7326 7327 component_unbind_all(dev, spec->comps); 7328 } 7329 7330 static const struct component_master_ops comp_master_ops = { 7331 .bind = comp_bind, 7332 .unbind = comp_unbind, 7333 }; 7334 7335 static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc, 7336 struct snd_pcm_substream *sub, int action) 7337 { 7338 struct alc_spec *spec = cdc->spec; 7339 int i; 7340 7341 for (i = 0; i < HDA_MAX_COMPONENTS; i++) { 7342 if (spec->comps[i].dev) 7343 spec->comps[i].playback_hook(spec->comps[i].dev, action); 7344 } 7345 } 7346 7347 static void cs35l41_generic_fixup(struct hda_codec *cdc, int action, const char *bus, 7348 const char *hid, int count) 7349 { 7350 struct device *dev = hda_codec_dev(cdc); 7351 struct alc_spec *spec = cdc->spec; 7352 char *name; 7353 int ret, i; 7354 7355 switch (action) { 7356 case HDA_FIXUP_ACT_PRE_PROBE: 7357 for (i = 0; i < count; i++) { 7358 name = devm_kasprintf(dev, GFP_KERNEL, 7359 "%s-%s:00-cs35l41-hda.%d", bus, hid, i); 7360 if (!name) 7361 return; 7362 component_match_add(dev, &spec->match, comp_match_dev_name, name); 7363 } 7364 ret = component_master_add_with_match(dev, &comp_master_ops, spec->match); 7365 if (ret) 7366 codec_err(cdc, "Fail to register component aggregator %d\n", ret); 7367 else 7368 spec->gen.pcm_playback_hook = comp_generic_playback_hook; 7369 break; 7370 } 7371 } 7372 7373 static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 7374 { 7375 cs35l41_generic_fixup(cdc, action, "i2c", "CSC3551", 2); 7376 } 7377 7378 static void alc287_legion_16achg6_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc, 7379 struct snd_pcm_substream *sub, int action) 7380 { 7381 struct alc_spec *spec = cdc->spec; 7382 unsigned int rx_slot; 7383 int i; 7384 7385 switch (action) { 7386 case HDA_GEN_PCM_ACT_PREPARE: 7387 rx_slot = 0; 7388 i = find_comp_by_dev_name(spec, "i2c-CLSA0100:00-cs35l41-hda.0"); 7389 if (i >= 0) 7390 spec->comps[i].set_channel_map(spec->comps[i].dev, 0, NULL, 1, &rx_slot); 7391 7392 rx_slot = 1; 7393 i = find_comp_by_dev_name(spec, "i2c-CLSA0100:00-cs35l41-hda.1"); 7394 if (i >= 0) 7395 spec->comps[i].set_channel_map(spec->comps[i].dev, 0, NULL, 1, &rx_slot); 7396 break; 7397 } 7398 7399 comp_generic_playback_hook(hinfo, cdc, sub, action); 7400 } 7401 7402 static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix, 7403 int action) 7404 { 7405 struct device *dev = hda_codec_dev(cdc); 7406 struct alc_spec *spec = cdc->spec; 7407 int ret; 7408 7409 switch (action) { 7410 case HDA_FIXUP_ACT_PRE_PROBE: 7411 component_match_add(dev, &spec->match, comp_match_dev_name, 7412 "i2c-CLSA0100:00-cs35l41-hda.0"); 7413 component_match_add(dev, &spec->match, comp_match_dev_name, 7414 "i2c-CLSA0100:00-cs35l41-hda.1"); 7415 ret = component_master_add_with_match(dev, &comp_master_ops, spec->match); 7416 if (ret) 7417 codec_err(cdc, "Fail to register component aggregator %d\n", ret); 7418 else 7419 spec->gen.pcm_playback_hook = alc287_legion_16achg6_playback_hook; 7420 break; 7421 } 7422 } 7423 7274 7424 /* for alc295_fixup_hp_top_speakers */ 7275 7425 #include "hp_x360_helper.c" … … 7335 7485 } else { 7336 7486 snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c); 7487 } 7488 } 7489 7490 static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec, 7491 const struct hda_fixup *fix, 7492 int action) 7493 { 7494 struct alc_spec *spec = codec->spec; 7495 struct hda_input_mux *imux = &spec->gen.input_mux; 7496 int i; 7497 7498 alc269_fixup_limit_int_mic_boost(codec, fix, action); 7499 7500 switch (action) { 7501 case HDA_FIXUP_ACT_PRE_PROBE: 7502 /** 7503 * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic) 7504 * to Hi-Z to avoid pop noises at startup and when plugging and 7505 * unplugging headphones. 7506 */ 7507 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); 7508 snd_hda_codec_set_pin_target(codec, 0x1b, PIN_VREFHIZ); 7509 break; 7510 case HDA_FIXUP_ACT_PROBE: 7511 /** 7512 * Make the internal mic (0x12) the default input source to 7513 * prevent pop noises on cold boot. 7514 */ 7515 for (i = 0; i < imux->num_items; i++) { 7516 if (spec->gen.imux_pins[i] == 0x12) { 7517 spec->gen.cur_mux[0] = i; 7518 break; 7519 } 7520 } 7521 break; 7337 7522 } 7338 7523 } … … 7379 7564 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 7380 7565 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 7566 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, 7381 7567 ALC269_FIXUP_HEADSET_MODE, 7382 7568 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, … … 7562 7748 ALC285_FIXUP_LEGION_Y9000X_SPEAKERS, 7563 7749 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, 7750 ALC287_FIXUP_LEGION_16ACHG6, 7751 ALC287_FIXUP_CS35L41_I2C_2, 7752 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED, 7753 ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE, 7564 7754 }; 7565 7755 … … 9629 9819 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9630 9820 }, 9821 [ALC287_FIXUP_LEGION_16ACHG6] = { 9822 .type = HDA_FIXUP_FUNC, 9823 .v.func = alc287_fixup_legion_16achg6_speakers, 9824 }, 9825 [ALC287_FIXUP_CS35L41_I2C_2] = { 9826 .type = HDA_FIXUP_FUNC, 9827 .v.func = cs35l41_fixup_i2c_two, 9828 .chained = true, 9829 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 9830 }, 9831 #ifdef TARGET_OS2xxx 9832 [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = { 9833 .type = HDA_FIXUP_VERBS, 9834 .v.verbs = (const struct hda_verb[]) { 9835 { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 }, 9836 { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 }, 9837 { } 9838 }, 9839 .chained = true, 9840 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 9841 }, 9842 #endif 9843 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET] = { 9844 .type = HDA_FIXUP_FUNC, 9845 .v.func = alc_fixup_dell4_mic_no_presence_quiet, 9846 .chained = true, 9847 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 9848 }, 9849 #ifdef TARGET_OS2xxx 9850 [ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE] = { 9851 .type = HDA_FIXUP_PINS, 9852 .v.pins = (const struct hda_pintbl[]) { 9853 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */ 9854 { } 9855 }, 9856 .chained = true, 9857 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9858 }, 9859 #endif 9631 9860 }; 9632 9861 … … 9719 9948 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), 9720 9949 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), 9950 SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET), 9721 9951 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC), 9722 9952 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK), … … 9724 9954 SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 9725 9955 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 9956 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK), 9726 9957 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 9727 9958 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), … … 9842 10073 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 9843 10074 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED), 10075 SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED), 9844 10076 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED), 9845 10077 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), … … 9847 10079 SND_PCI_QUIRK(0x103c, 0x89c3, "HP", ALC285_FIXUP_HP_GPIO_LED), 9848 10080 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10081 SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), 9849 10082 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 9850 10083 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), … … 9974 10207 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9975 10208 SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10209 SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9976 10210 SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9977 10211 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10031 10265 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), 10032 10266 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), 10267 SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2), 10268 SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2), 10269 SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2), 10033 10270 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 10034 10271 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), … … 10042 10279 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 10043 10280 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), 10281 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 10044 10282 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), 10045 10283 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME), 10046 10284 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), 10285 SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 10047 10286 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), 10048 10287 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF), … … 10050 10289 SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), 10051 10290 SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP), 10291 SND_PCI_QUIRK(0x17aa, 0x3847, "Legion 7 16ACHG6", ALC287_FIXUP_LEGION_16ACHG6), 10052 10292 SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 10053 10293 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), … … 10072 10312 SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10073 10313 SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10314 SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), 10074 10315 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 10075 10316 SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), … … 10085 10326 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X), 10086 10327 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS), 10328 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP), 10329 SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP), 10330 SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), 10331 SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), 10332 SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), 10333 SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), 10334 SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), 10335 SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP), 10087 10336 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 10088 10337 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), … … 10092 10341 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), 10093 10342 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), 10343 SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 10094 10344 10095 10345 #if 0 … … 10886 11136 case 0x10ec0285: 10887 11137 case 0x10ec0289: 10888 spec->codec_variant = ALC269_TYPE_ALC215; 11138 if (alc_get_coef0(codec) & 0x0010) 11139 spec->codec_variant = ALC269_TYPE_ALC245; 11140 else 11141 spec->codec_variant = ALC269_TYPE_ALC215; 10889 11142 spec->shutup = alc225_shutup; 10890 11143 spec->init_hook = alc225_init; … … 12187 12440 SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE), 12188 12441 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS), 12442 SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN), 12189 12443 SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN), 12190 12444 SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN), -
GPL/branches/uniaud32-exp/alsa-kernel/pci/intel8x0.c
r736 r737 3133 3133 } 3134 3134 3135 static int snd_intel8x0_probe(struct pci_dev *pci,3136 const struct pci_device_id *pci_id)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 3215 3221 static struct pci_driver intel8x0_driver = { 3216 3222 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/korg1212/korg1212.c
r736 r737 2356 2356 err = snd_korg1212_create(card, pci); 2357 2357 if (err < 0) 2358 return err;2358 goto error; 2359 2359 2360 2360 strcpy(card->driver, "korg1212"); … … 2367 2367 err = snd_card_register(card); 2368 2368 if (err < 0) 2369 return err;2369 goto error; 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; 2373 2377 } 2374 2378 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/maestro3.c
r736 r737 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 int 2717 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 2716 2722 static struct pci_driver m3_driver = { 2717 2723 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/alsa-kernel/pci/nm256/nm256.c
r736 r737 1578 1578 1579 1579 snd_nm256_init_chip(chip); 1580 card->private_free = snd_nm256_free;1581 1580 1582 1581 // pci_set_master(pci); /* needed? */ … … 1685 1684 if (err < 0) 1686 1685 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
r736 r737 5445 5445 err = snd_hdsp_create(card, hdsp); 5446 5446 if (err) 5447 return err;5447 goto error; 5448 5448 5449 5449 strcpy(card->shortname, "Hammerfall DSP"); … … 5452 5452 err = snd_card_register(card); 5453 5453 if (err) 5454 return err;5454 goto error; 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; 5458 5462 } 5459 5463 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/rme9652/hdspm.c
r736 r737 6896 6896 err = snd_hdspm_create(card, hdspm); 6897 6897 if (err < 0) 6898 return err;6898 goto error; 6899 6899 6900 6900 if (hdspm->io_type != MADIface) { … … 6915 6915 err = snd_card_register(card); 6916 6916 if (err < 0) 6917 return err;6917 goto error; 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; 6923 6927 } 6924 6928 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/rme9652/rme9652.c
r736 r737 2573 2573 err = snd_rme9652_create(card, rme9652, precise_ptr[dev]); 2574 2574 if (err) 2575 return err;2575 goto error; 2576 2576 2577 2577 strcpy(card->shortname, rme9652->card_name); … … 2581 2581 err = snd_card_register(card); 2582 2582 if (err) 2583 return err;2583 goto error; 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; 2587 2591 } 2588 2592 -
GPL/branches/uniaud32-exp/alsa-kernel/pci/via82xx.c
r736 r737 2463 2463 }; 2464 2464 2465 static int snd_via82xx_probe(struct pci_dev *pci,2466 const struct pci_device_id *pci_id)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 2576 2582 static struct pci_driver via82xx_driver = { 2577 2583 .name = KBUILD_MODNAME, -
GPL/branches/uniaud32-exp/include/linux/device.h
r730 r737 42 42 43 43 const struct dev_pm_ops *pm; 44 }; 45 46 struct device_dma_parameters { 47 /* 48 * a low level driver may set these to teach IOMMU code about 49 * sg limitations. 50 */ 51 unsigned int max_segment_size; 52 unsigned int min_align_mask; 53 unsigned long segment_boundary_mask; 44 54 }; 45 55 … … 67 77 void *platform_data; 68 78 struct dev_pm_info power; 79 struct device_dma_parameters *dma_parms; 69 80 struct list_head dma_pools; /* dma pools (if dma'ble) */ 70 81 struct device_driver *driver; … … 333 344 } 334 345 346 /* Generic device matching functions that all busses can use to match with */ 347 int device_match_name(struct device *dev, const void *name); 348 int device_match_of_node(struct device *dev, const void *np); 349 335 350 #endif /* _LINUX_DEVICE_H */ 336 351 -
GPL/branches/uniaud32-exp/include/linux/dma-mapping.h
r736 r737 135 135 } 136 136 #define pci_set_consistent_dma_mask(p,x) pci_set_dma_mask(p,x) 137 138 static inline int dma_set_max_seg_size(struct device *dev, unsigned int size) 139 { 140 if (dev->dma_parms) { 141 dev->dma_parms->max_segment_size = size; 142 return 0; 143 } 144 return -EIO; 145 } 137 146 #endif -
GPL/branches/uniaud32-exp/include/linux/errno.h
r615 r737 13 13 #define ERESTARTNOHAND 514 /* restart if no handler.. */ 14 14 #define ENOIOCTLCMD 515 /* No ioctl command */ 15 #define EPROBE_DEFER 517 /* Driver requests probe retry */ 15 16 #define ENOTSUPP 524 /* Operation is not supported */ 16 17 -
GPL/branches/uniaud32-exp/include/linux/of.h
r615 r737 28 28 29 29 30 struct device_node { 31 const char *name; 32 // phandle phandle; 33 const char *full_name; 34 // struct fwnode_handle fwnode; 35 36 struct property *properties; 37 struct property *deadprops; /* removed properties */ 38 struct device_node *parent; 39 struct device_node *child; 40 struct device_node *sibling; 41 struct kobject kobj; 42 unsigned long _flags; 43 void *data; 44 }; 30 45 struct property { 31 46 char *name; … … 60 75 return prop ? true : false; 61 76 } 77 extern void of_node_put(struct device_node *node); 62 78 63 79 #endif /* _LINUX_OF_H */ -
GPL/branches/uniaud32-exp/include/linux/stddef.h
r305 r737 10 10 11 11 #undef offsetof 12 #define offsetof( TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)12 #define offsetof(__typ,__id) ((size_t)&(((__typ*)0)->__id)) 13 13 14 14 #endif -
GPL/branches/uniaud32-exp/include/linux/string.h
r720 r737 31 31 #define scnprintf snprintf 32 32 ssize_t strscpy(char *dest, const char *src, size_t count); 33 extern bool sysfs_streq(const char *s1, const char *s2); 33 34 34 35 #endif -
GPL/branches/uniaud32-exp/include/linux/wait.h
r697 r737 133 133 #define wait_event(wq_head, condition) 134 134 #define wake_up_all(x) 135 136 #define wait_event_cmd(wq_head, condition, cmd1, cmd2) 137 135 138 #endif -
GPL/branches/uniaud32-exp/lib32/Makefile
r675 r737 30 30 strncmp.obj timer.obj kobject.obj driver.obj drivers_base.obj & 31 31 instropl2.obj instropl3.obj vsprintf.obj bitmap.obj find_next_bit.obj & 32 regmap.obj regcache.obj regcache-flat.obj regcache-rbtree.obj 32 regmap.obj regcache.obj regcache-flat.obj regcache-rbtree.obj component.obj 33 33 34 34 TARGET = linuxlib -
GPL/branches/uniaud32-exp/lib32/devres.c
r720 r737 472 472 } 473 473 EXPORT_SYMBOL(devm_ioremap); 474 475 /** 476 * devm_kvasprintf - Allocate resource managed space and format a string 477 * into that. 478 * @dev: Device to allocate memory for 479 * @gfp: the GFP mask used in the devm_kmalloc() call when 480 * allocating memory 481 * @fmt: The printf()-style format string 482 * @ap: Arguments for the format string 483 * RETURNS: 484 * Pointer to allocated string on success, NULL on failure. 485 */ 486 char *devm_kvasprintf(struct device *dev, gfp_t gfp, const char *fmt, 487 va_list ap) 488 { 489 unsigned int len; 490 char *p; 491 va_list aq; 492 493 va_copy(aq, ap); 494 len = vsnprintf(NULL, 0, fmt, aq); 495 va_end(aq); 496 497 p = devm_kmalloc(dev, len+1, gfp); 498 if (!p) 499 return NULL; 500 501 vsnprintf(p, len+1, fmt, ap); 502 503 return p; 504 } 505 EXPORT_SYMBOL(devm_kvasprintf); 506 /** 507 * devm_kasprintf - Allocate resource managed space and format a string 508 * into that. 509 * @dev: Device to allocate memory for 510 * @gfp: the GFP mask used in the devm_kmalloc() call when 511 * allocating memory 512 * @fmt: The printf()-style format string 513 * @...: Arguments for the format string 514 * RETURNS: 515 * Pointer to allocated string on success, NULL on failure. 516 */ 517 char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...) 518 { 519 va_list ap; 520 char *p; 521 522 va_start(ap, fmt); 523 p = devm_kvasprintf(dev, gfp, fmt, ap); 524 va_end(ap); 525 526 return p; 527 } 528 EXPORT_SYMBOL_GPL(devm_kasprintf); -
GPL/branches/uniaud32-exp/lib32/drivers_base.c
r718 r737 181 181 #endif 182 182 } 183 184 int device_match_name(struct device *dev, const void *name) 185 { 186 return sysfs_streq(dev_name(dev), name); 187 } 188 EXPORT_SYMBOL_GPL(device_match_name); 189 190 int device_match_of_node(struct device *dev, const void *np) 191 { 192 return dev->of_node == np; 193 } 194 EXPORT_SYMBOL_GPL(device_match_of_node); -
GPL/branches/uniaud32-exp/lib32/misc.c
r639 r737 28 28 #include <linux/init.h> 29 29 #include <linux/fs.h> 30 #include <linux/of.h> 30 31 #include <linux/poll.h> 31 32 #define CONFIG_PROC_FS 1 … … 784 785 free_pages((unsigned long) ptr, pg); 785 786 } 787 788 /** 789 * of_node_put() - Decrement refcount of a node 790 * @node: Node to dec refcount, NULL is supported to simplify writing of 791 * callers 792 */ 793 void of_node_put(struct device_node *node) 794 { 795 if (node) 796 kobject_put(&node->kobj); 797 } 798 799 /** 800 * sysfs_streq - return true if strings are equal, modulo trailing newline 801 * @s1: one string 802 * @s2: another string 803 * 804 * This routine returns true iff two strings are equal, treating both 805 * NUL and newline-then-NUL as equivalent string terminations. It's 806 * geared for use with sysfs input strings, which generally terminate 807 * with newlines but are compared against values without newlines. 808 */ 809 bool sysfs_streq(const char *s1, const char *s2) 810 { 811 while (*s1 && *s1 == *s2) { 812 s1++; 813 s2++; 814 } 815 816 if (*s1 == *s2) 817 return true; 818 if (!*s1 && *s2 == '\n' && !s2[1]) 819 return true; 820 if (*s1 == '\n' && !s1[1] && !*s2) 821 return true; 822 return false; 823 } 824 EXPORT_SYMBOL(sysfs_streq);
Note:
See TracChangeset
for help on using the changeset viewer.
