Changeset 717 for GPL/trunk/alsa-kernel/hda
- Timestamp:
- Aug 7, 2022, 6:11:12 PM (3 years ago)
- Location:
- GPL/trunk
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
alsa-kernel/hda/ext/hdac_ext_stream.c (modified) (10 diffs)
-
alsa-kernel/hda/hdac_controller.c (modified) (1 diff)
-
alsa-kernel/hda/hdac_device.c (modified) (1 diff)
-
alsa-kernel/hda/hdac_stream.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-next merged: 710-716
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/hda/ext/hdac_ext_stream.c
r695 r717 107 107 EXPORT_SYMBOL_GPL(snd_hdac_stream_free_all); 108 108 109 /** 110 * snd_hdac_ext_stream_decouple - decouple the hdac stream 111 * @bus: HD-audio core bus 112 * @stream: HD-audio ext core stream object to initialize 113 * @decouple: flag to decouple 114 */ 115 void snd_hdac_ext_stream_decouple(struct hdac_bus *bus, 116 struct hdac_ext_stream *stream, bool decouple) 109 void snd_hdac_ext_stream_decouple_locked(struct hdac_bus *bus, 110 struct hdac_ext_stream *stream, 111 bool decouple) 117 112 { 118 113 struct hdac_stream *hstream = &stream->hstream; … … 120 115 int mask = AZX_PPCTL_PROCEN(hstream->index); 121 116 122 spin_lock_irq(&bus->reg_lock);123 117 val = readw(bus->ppcap + AZX_REG_PP_PPCTL) & mask; 124 118 … … 129 123 130 124 stream->decoupled = decouple; 125 } 126 EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_decouple_locked); 127 128 /** 129 * snd_hdac_ext_stream_decouple - decouple the hdac stream 130 * @bus: HD-audio core bus 131 * @stream: HD-audio ext core stream object to initialize 132 * @decouple: flag to decouple 133 */ 134 void snd_hdac_ext_stream_decouple(struct hdac_bus *bus, 135 struct hdac_ext_stream *stream, bool decouple) 136 { 137 spin_lock_irq(&bus->reg_lock); 138 snd_hdac_ext_stream_decouple_locked(bus, stream, decouple); 131 139 spin_unlock_irq(&bus->reg_lock); 132 140 } … … 253 261 } 254 262 263 spin_lock_irq(&bus->reg_lock); 255 264 list_for_each_entry(stream, &bus->stream_list, list) { 256 265 struct hdac_ext_stream *hstream = container_of(stream, … … 267 276 268 277 if (!hstream->link_locked) { 269 snd_hdac_ext_stream_decouple (bus, hstream, true);278 snd_hdac_ext_stream_decouple_locked(bus, hstream, true); 270 279 res = hstream; 271 280 break; … … 273 282 } 274 283 if (res) { 275 spin_lock_irq(&bus->reg_lock);276 284 res->link_locked = 1; 277 285 res->link_substream = substream; 278 spin_unlock_irq(&bus->reg_lock);279 }286 } 287 spin_unlock_irq(&bus->reg_lock); 280 288 return res; 281 289 } … … 293 301 } 294 302 303 spin_lock_irq(&bus->reg_lock); 295 304 list_for_each_entry(stream, &bus->stream_list, list) { 296 305 struct hdac_ext_stream *hstream = container_of(stream, … … 302 311 if (!stream->opened) { 303 312 if (!hstream->decoupled) 304 snd_hdac_ext_stream_decouple (bus, hstream, true);313 snd_hdac_ext_stream_decouple_locked(bus, hstream, true); 305 314 res = hstream; 306 315 break; … … 308 317 } 309 318 if (res) { 310 spin_lock_irq(&bus->reg_lock);311 319 res->hstream.opened = 1; 312 320 res->hstream.running = 0; 313 321 res->hstream.substream = substream; 314 spin_unlock_irq(&bus->reg_lock);315 }322 } 323 spin_unlock_irq(&bus->reg_lock); 316 324 317 325 return res; … … 379 387 380 388 case HDAC_EXT_STREAM_TYPE_HOST: 389 spin_lock_irq(&bus->reg_lock); 381 390 if (stream->decoupled && !stream->link_locked) 382 snd_hdac_ext_stream_decouple(bus, stream, false); 391 snd_hdac_ext_stream_decouple_locked(bus, stream, false); 392 spin_unlock_irq(&bus->reg_lock); 383 393 snd_hdac_stream_release(&stream->hstream); 384 394 break; 385 395 386 396 case HDAC_EXT_STREAM_TYPE_LINK: 397 spin_lock_irq(&bus->reg_lock); 387 398 if (stream->decoupled && !stream->hstream.opened) 388 snd_hdac_ext_stream_decouple(bus, stream, false); 389 spin_lock_irq(&bus->reg_lock); 399 snd_hdac_ext_stream_decouple_locked(bus, stream, false); 390 400 stream->link_locked = 0; 391 401 stream->link_substream = NULL; -
GPL/trunk/alsa-kernel/hda/hdac_controller.c
r695 r717 428 428 goto skip_reset; 429 429 430 /* clear STATESTS */ 431 snd_hdac_chip_writew(bus, STATESTS, STATESTS_INT_MASK); 430 /* clear STATESTS if not in reset */ 431 if (snd_hdac_chip_readb(bus, GCTL) & AZX_GCTL_RESET) 432 snd_hdac_chip_writew(bus, STATESTS, STATESTS_INT_MASK); 432 433 433 434 /* reset controller */ -
GPL/trunk/alsa-kernel/hda/hdac_device.c
r629 r717 675 675 { 0x17e8, "Chrontel" }, 676 676 { 0x1854, "LG" }, 677 { 0x19e5, "Huawei" }, 677 678 { 0x1aec, "Wolfson Microelectronics" }, 678 679 { 0x1af4, "QEMU" }, -
GPL/trunk/alsa-kernel/hda/hdac_stream.c
r695 r717 302 302 (substream->stream + 1); 303 303 304 spin_lock_irq(&bus->reg_lock); 304 305 list_for_each_entry(azx_dev, &bus->stream_list, list, struct hdac_stream) { 305 306 if (azx_dev->direction != substream->stream) … … 315 316 } 316 317 if (res) { 317 spin_lock_irq(&bus->reg_lock);318 318 res->opened = 1; 319 319 res->running = 0; 320 320 res->assigned_key = key; 321 321 res->substream = substream; 322 spin_unlock_irq(&bus->reg_lock);323 }322 } 323 spin_unlock_irq(&bus->reg_lock); 324 324 return res; 325 325 } … … 539 539 cc->mask = CLOCKSOURCE_MASK(32); 540 540 541 #ifndef TARGET_OS2 542 /* 543 * Calculate the optimal mult/shift values. The counter wraps 544 * around after ~178.9 seconds. 545 */ 546 clocks_calc_mult_shift(&cc->mult, &cc->shift, 24000000, 547 NSEC_PER_SEC, 178); 548 #else 541 549 /* 542 550 * Converting from 24 MHz to ns means applying a 125/3 factor. … … 551 559 cc->mult = 125; /* saturation after 195 years */ 552 560 cc->shift = 0; 553 561 #endif 554 562 nsec = 0; /* audio time is elapsed time since trigger */ 555 563 timecounter_init(tc, cc, nsec);
Note:
See TracChangeset
for help on using the changeset viewer.
