Changeset 717 for GPL/trunk/alsa-kernel/hda/ext
- Timestamp:
- Aug 7, 2022, 6:11:12 PM (3 years ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
alsa-kernel/hda/ext/hdac_ext_stream.c (modified) (10 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;
Note:
See TracChangeset
for help on using the changeset viewer.
