Lines Matching refs:oss
544 plugin = runtime->oss.plugin_first; in snd_pcm_oss_plugin_clear()
550 runtime->oss.plugin_first = runtime->oss.plugin_last = NULL; in snd_pcm_oss_plugin_clear()
557 plugin->next = runtime->oss.plugin_first; in snd_pcm_plugin_insert()
559 if (runtime->oss.plugin_first) { in snd_pcm_plugin_insert()
560 runtime->oss.plugin_first->prev = plugin; in snd_pcm_plugin_insert()
561 runtime->oss.plugin_first = plugin; in snd_pcm_plugin_insert()
563 runtime->oss.plugin_last = in snd_pcm_plugin_insert()
564 runtime->oss.plugin_first = plugin; in snd_pcm_plugin_insert()
573 plugin->prev = runtime->oss.plugin_last; in snd_pcm_plugin_append()
574 if (runtime->oss.plugin_last) { in snd_pcm_plugin_append()
575 runtime->oss.plugin_last->next = plugin; in snd_pcm_plugin_append()
576 runtime->oss.plugin_last = plugin; in snd_pcm_plugin_append()
578 runtime->oss.plugin_last = in snd_pcm_plugin_append()
579 runtime->oss.plugin_first = plugin; in snd_pcm_plugin_append()
590 if (buffer_size == runtime->oss.buffer_bytes) in snd_pcm_oss_bytes()
593 return runtime->oss.buffer_bytes * bytes / buffer_size; in snd_pcm_oss_bytes()
596 u64 bsize = (u64)runtime->oss.buffer_bytes * (u64)bytes; in snd_pcm_oss_bytes()
606 if (buffer_size == runtime->oss.buffer_bytes) in snd_pcm_alsa_frames()
608 return bytes_to_frames(runtime, (buffer_size * bytes) / runtime->oss.buffer_bytes); in snd_pcm_alsa_frames()
706 if (oss_buffer_size > runtime->oss.mmap_bytes) in snd_pcm_oss_period_size()
707 oss_buffer_size = runtime->oss.mmap_bytes; in snd_pcm_oss_period_size()
710 if (substream->oss.setup.period_size > 16) in snd_pcm_oss_period_size()
711 oss_period_size = substream->oss.setup.period_size; in snd_pcm_oss_period_size()
712 else if (runtime->oss.fragshift) { in snd_pcm_oss_period_size()
713 oss_period_size = 1 << runtime->oss.fragshift; in snd_pcm_oss_period_size()
724 if (runtime->oss.subdivision == 0) { in snd_pcm_oss_period_size()
731 sd = runtime->oss.subdivision; in snd_pcm_oss_period_size()
757 if (substream->oss.setup.periods > 1) in snd_pcm_oss_period_size()
758 oss_periods = substream->oss.setup.periods; in snd_pcm_oss_period_size()
761 if (s > 0 && runtime->oss.maxfrags && s > runtime->oss.maxfrags) in snd_pcm_oss_period_size()
762 s = runtime->oss.maxfrags; in snd_pcm_oss_period_size()
782 runtime->oss.period_bytes = oss_period_size; in snd_pcm_oss_period_size()
783 runtime->oss.period_frames = 1; in snd_pcm_oss_period_size()
784 runtime->oss.periods = oss_periods; in snd_pcm_oss_period_size()
831 if (mutex_lock_interruptible(&runtime->oss.params_lock)) in lock_params()
833 if (atomic_read(&runtime->oss.rw_ref)) { in lock_params()
834 mutex_unlock(&runtime->oss.params_lock); in lock_params()
842 mutex_unlock(&runtime->oss.params_lock); in unlock_params()
849 kvfree(runtime->oss.buffer); in snd_pcm_oss_release_buffers()
850 runtime->oss.buffer = NULL; in snd_pcm_oss_release_buffers()
871 if (!runtime->oss.params) in snd_pcm_oss_change_params_locked()
884 direct = substream->oss.setup.direct; in snd_pcm_oss_change_params_locked()
904 err = choose_rate(substream, sparams, runtime->oss.rate); in snd_pcm_oss_change_params_locked()
909 runtime->oss.channels, NULL); in snd_pcm_oss_change_params_locked()
913 format = snd_pcm_oss_format_from(runtime->oss.format); in snd_pcm_oss_change_params_locked()
944 (__force int)snd_pcm_oss_format_from(runtime->oss.format), 0); in snd_pcm_oss_change_params_locked()
946 runtime->oss.channels, 0); in snd_pcm_oss_change_params_locked()
948 runtime->oss.rate, 0); in snd_pcm_oss_change_params_locked()
964 n = snd_pcm_plug_slave_size(substream, runtime->oss.period_bytes / oss_frame_size); in snd_pcm_oss_change_params_locked()
970 runtime->oss.periods, NULL); in snd_pcm_oss_change_params_locked()
992 if (runtime->oss.plugin_first) { in snd_pcm_oss_change_params_locked()
1011 if (runtime->oss.trigger) { in snd_pcm_oss_change_params_locked()
1026 substream->oss.setup.nosilence) { in snd_pcm_oss_change_params_locked()
1044 runtime->oss.periods = params_periods(sparams); in snd_pcm_oss_change_params_locked()
1051 if (runtime->oss.plugin_first) { in snd_pcm_oss_change_params_locked()
1058 oss_buffer_size = array_size(oss_period_size, runtime->oss.periods); in snd_pcm_oss_change_params_locked()
1064 runtime->oss.period_bytes = oss_period_size; in snd_pcm_oss_change_params_locked()
1065 runtime->oss.buffer_bytes = oss_buffer_size; in snd_pcm_oss_change_params_locked()
1068 runtime->oss.period_bytes, in snd_pcm_oss_change_params_locked()
1069 runtime->oss.buffer_bytes); in snd_pcm_oss_change_params_locked()
1074 runtime->oss.format = snd_pcm_oss_format_to(params_format(params)); in snd_pcm_oss_change_params_locked()
1075 runtime->oss.channels = params_channels(params); in snd_pcm_oss_change_params_locked()
1076 runtime->oss.rate = params_rate(params); in snd_pcm_oss_change_params_locked()
1078 kvfree(runtime->oss.buffer); in snd_pcm_oss_change_params_locked()
1079 runtime->oss.buffer = kvzalloc(runtime->oss.period_bytes, GFP_KERNEL); in snd_pcm_oss_change_params_locked()
1080 if (!runtime->oss.buffer) { in snd_pcm_oss_change_params_locked()
1085 runtime->oss.params = 0; in snd_pcm_oss_change_params_locked()
1086 runtime->oss.prepare = 1; in snd_pcm_oss_change_params_locked()
1087 runtime->oss.buffer_used = 0; in snd_pcm_oss_change_params_locked()
1091 runtime->oss.period_frames = snd_pcm_alsa_frames(substream, oss_period_size); in snd_pcm_oss_change_params_locked()
1111 if (!(mutex_trylock(&runtime->oss.params_lock))) in snd_pcm_oss_change_params()
1113 } else if (mutex_lock_interruptible(&runtime->oss.params_lock)) in snd_pcm_oss_change_params()
1117 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_change_params()
1132 if (substream->runtime->oss.params) { in snd_pcm_oss_get_active_substream()
1160 runtime->oss.prepare = 0; in snd_pcm_oss_prepare()
1161 runtime->oss.prev_hw_ptr_period = 0; in snd_pcm_oss_prepare()
1162 runtime->oss.period_ptr = 0; in snd_pcm_oss_prepare()
1163 runtime->oss.buffer_used = 0; in snd_pcm_oss_prepare()
1174 if (runtime->oss.params) { in snd_pcm_oss_make_ready()
1179 if (runtime->oss.prepare) { in snd_pcm_oss_make_ready()
1180 if (mutex_lock_interruptible(&runtime->oss.params_lock)) in snd_pcm_oss_make_ready()
1183 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_make_ready()
1197 if (runtime->oss.params) { in snd_pcm_oss_make_ready_locked()
1202 if (runtime->oss.prepare) { in snd_pcm_oss_make_ready_locked()
1252 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_write3()
1255 mutex_lock(&runtime->oss.params_lock); in snd_pcm_oss_write3()
1291 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_read3()
1294 mutex_lock(&runtime->oss.params_lock); in snd_pcm_oss_read3()
1373 if (runtime->oss.plugin_first) { in snd_pcm_oss_write2()
1375 …size_t oss_frame_bytes = (runtime->oss.plugin_first->src_width * runtime->oss.plugin_first->src_fo… in snd_pcm_oss_write2()
1377 if (copy_from_user(runtime->oss.buffer, (const char __force __user *)buf, bytes)) in snd_pcm_oss_write2()
1379 buf = runtime->oss.buffer; in snd_pcm_oss_write2()
1410 atomic_inc(&runtime->oss.rw_ref); in snd_pcm_oss_write1()
1412 if (mutex_lock_interruptible(&runtime->oss.params_lock)) { in snd_pcm_oss_write1()
1419 if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) { in snd_pcm_oss_write1()
1421 if (tmp + runtime->oss.buffer_used > runtime->oss.period_bytes) in snd_pcm_oss_write1()
1422 tmp = runtime->oss.period_bytes - runtime->oss.buffer_used; in snd_pcm_oss_write1()
1424 if (copy_from_user(runtime->oss.buffer + runtime->oss.buffer_used, buf, tmp)) { in snd_pcm_oss_write1()
1429 runtime->oss.buffer_used += tmp; in snd_pcm_oss_write1()
1433 if (substream->oss.setup.partialfrag || in snd_pcm_oss_write1()
1434 runtime->oss.buffer_used == runtime->oss.period_bytes) { in snd_pcm_oss_write1()
1435 tmp = snd_pcm_oss_write2(substream, runtime->oss.buffer + runtime->oss.period_ptr, in snd_pcm_oss_write1()
1436 runtime->oss.buffer_used - runtime->oss.period_ptr, 1); in snd_pcm_oss_write1()
1439 runtime->oss.bytes += tmp; in snd_pcm_oss_write1()
1440 runtime->oss.period_ptr += tmp; in snd_pcm_oss_write1()
1441 runtime->oss.period_ptr %= runtime->oss.period_bytes; in snd_pcm_oss_write1()
1442 if (runtime->oss.period_ptr == 0 || in snd_pcm_oss_write1()
1443 runtime->oss.period_ptr == runtime->oss.buffer_used) in snd_pcm_oss_write1()
1444 runtime->oss.buffer_used = 0; in snd_pcm_oss_write1()
1453 runtime->oss.period_bytes, 0); in snd_pcm_oss_write1()
1456 runtime->oss.bytes += tmp; in snd_pcm_oss_write1()
1461 tmp != runtime->oss.period_bytes) in snd_pcm_oss_write1()
1465 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_write1()
1474 atomic_dec(&runtime->oss.rw_ref); in snd_pcm_oss_write1()
1484 if (runtime->oss.plugin_first) { in snd_pcm_oss_read2()
1486 …size_t oss_frame_bytes = (runtime->oss.plugin_last->dst_width * runtime->oss.plugin_last->dst_form… in snd_pcm_oss_read2()
1488 buf = runtime->oss.buffer; in snd_pcm_oss_read2()
1520 atomic_inc(&runtime->oss.rw_ref); in snd_pcm_oss_read1()
1522 if (mutex_lock_interruptible(&runtime->oss.params_lock)) { in snd_pcm_oss_read1()
1529 if (bytes < runtime->oss.period_bytes || runtime->oss.buffer_used > 0) { in snd_pcm_oss_read1()
1530 if (runtime->oss.buffer_used == 0) { in snd_pcm_oss_read1()
1531 tmp = snd_pcm_oss_read2(substream, runtime->oss.buffer, runtime->oss.period_bytes, 1); in snd_pcm_oss_read1()
1534 runtime->oss.bytes += tmp; in snd_pcm_oss_read1()
1535 runtime->oss.period_ptr = tmp; in snd_pcm_oss_read1()
1536 runtime->oss.buffer_used = tmp; in snd_pcm_oss_read1()
1539 if ((size_t) tmp > runtime->oss.buffer_used) in snd_pcm_oss_read1()
1540 tmp = runtime->oss.buffer_used; in snd_pcm_oss_read1()
1541 …if (copy_to_user(buf, runtime->oss.buffer + (runtime->oss.period_ptr - runtime->oss.buffer_used), … in snd_pcm_oss_read1()
1548 runtime->oss.buffer_used -= tmp; in snd_pcm_oss_read1()
1551 runtime->oss.period_bytes, 0); in snd_pcm_oss_read1()
1554 runtime->oss.bytes += tmp; in snd_pcm_oss_read1()
1560 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_read1()
1569 atomic_dec(&runtime->oss.rw_ref); in snd_pcm_oss_read1()
1585 mutex_lock(&runtime->oss.params_lock); in snd_pcm_oss_reset()
1586 runtime->oss.prepare = 1; in snd_pcm_oss_reset()
1587 runtime->oss.buffer_used = 0; in snd_pcm_oss_reset()
1588 runtime->oss.prev_hw_ptr_period = 0; in snd_pcm_oss_reset()
1589 runtime->oss.period_ptr = 0; in snd_pcm_oss_reset()
1590 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_reset()
1627 result = snd_pcm_oss_write2(substream, runtime->oss.buffer, size, 1); in snd_pcm_oss_sync1()
1629 runtime->oss.buffer_used = 0; in snd_pcm_oss_sync1()
1675 atomic_inc(&runtime->oss.rw_ref); in snd_pcm_oss_sync()
1676 if (mutex_lock_interruptible(&runtime->oss.params_lock)) { in snd_pcm_oss_sync()
1677 atomic_dec(&runtime->oss.rw_ref); in snd_pcm_oss_sync()
1683 format = snd_pcm_oss_format_from(runtime->oss.format); in snd_pcm_oss_sync()
1685 if (runtime->oss.buffer_used > 0) { in snd_pcm_oss_sync()
1689 size = (8 * (runtime->oss.period_bytes - runtime->oss.buffer_used) + 7) / width; in snd_pcm_oss_sync()
1691 runtime->oss.buffer + runtime->oss.buffer_used, in snd_pcm_oss_sync()
1693 err = snd_pcm_oss_sync1(substream, runtime->oss.period_bytes); in snd_pcm_oss_sync()
1696 } else if (runtime->oss.period_ptr > 0) { in snd_pcm_oss_sync()
1700 size = runtime->oss.period_bytes - runtime->oss.period_ptr; in snd_pcm_oss_sync()
1702 runtime->oss.buffer, in snd_pcm_oss_sync()
1721 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_sync()
1722 atomic_dec(&runtime->oss.rw_ref); in snd_pcm_oss_sync()
1735 mutex_lock(&runtime->oss.params_lock); in snd_pcm_oss_sync()
1736 runtime->oss.prepare = 1; in snd_pcm_oss_sync()
1737 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_sync()
1749 mutex_lock(&runtime->oss.params_lock); in snd_pcm_oss_sync()
1750 runtime->oss.buffer_used = 0; in snd_pcm_oss_sync()
1751 runtime->oss.prepare = 1; in snd_pcm_oss_sync()
1752 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_sync()
1776 if (runtime->oss.rate != rate) { in snd_pcm_oss_set_rate()
1777 runtime->oss.params = 1; in snd_pcm_oss_set_rate()
1778 runtime->oss.rate = rate; in snd_pcm_oss_set_rate()
1793 return substream->runtime->oss.rate; in snd_pcm_oss_get_rate()
1814 if (runtime->oss.channels != channels) { in snd_pcm_oss_set_channels()
1815 runtime->oss.params = 1; in snd_pcm_oss_set_channels()
1816 runtime->oss.channels = channels; in snd_pcm_oss_set_channels()
1831 return substream->runtime->oss.channels; in snd_pcm_oss_get_channels()
1842 return substream->runtime->oss.period_bytes; in snd_pcm_oss_get_block_size()
1861 direct = substream->oss.setup.direct; in snd_pcm_oss_get_formats()
1911 if (runtime->oss.format != format) { in snd_pcm_oss_set_format()
1912 runtime->oss.params = 1; in snd_pcm_oss_set_format()
1913 runtime->oss.format = format; in snd_pcm_oss_set_format()
1929 return substream->runtime->oss.format; in snd_pcm_oss_get_format()
1938 subdivide = runtime->oss.subdivision; in snd_pcm_oss_set_subdivide1()
1943 if (runtime->oss.subdivision || runtime->oss.fragshift) in snd_pcm_oss_set_subdivide1()
1948 runtime->oss.subdivision = subdivide; in snd_pcm_oss_set_subdivide1()
1949 runtime->oss.params = 1; in snd_pcm_oss_set_subdivide1()
1981 if (runtime->oss.subdivision || runtime->oss.fragshift) in snd_pcm_oss_set_fragment1()
1986 runtime->oss.fragshift = fragshift; in snd_pcm_oss_set_fragment1()
1987 runtime->oss.maxfrags = (val >> 16) & 0xffff; in snd_pcm_oss_set_fragment1()
1988 if (runtime->oss.fragshift < 4) /* < 16 */ in snd_pcm_oss_set_fragment1()
1989 runtime->oss.fragshift = 4; in snd_pcm_oss_set_fragment1()
1990 if (runtime->oss.maxfrags < 2) in snd_pcm_oss_set_fragment1()
1991 runtime->oss.maxfrags = 2; in snd_pcm_oss_set_fragment1()
1992 runtime->oss.params = 1; in snd_pcm_oss_set_fragment1()
2099 if (mutex_lock_interruptible(&runtime->oss.params_lock)) in snd_pcm_oss_set_trigger()
2102 if (runtime->oss.trigger) in snd_pcm_oss_set_trigger()
2107 runtime->oss.trigger = 1; in snd_pcm_oss_set_trigger()
2111 if (!runtime->oss.trigger) in snd_pcm_oss_set_trigger()
2113 runtime->oss.trigger = 0; in snd_pcm_oss_set_trigger()
2116 runtime->oss.prepare = 1; in snd_pcm_oss_set_trigger()
2119 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_set_trigger()
2129 if (mutex_lock_interruptible(&runtime->oss.params_lock)) in snd_pcm_oss_set_trigger()
2132 if (runtime->oss.trigger) in snd_pcm_oss_set_trigger()
2134 runtime->oss.trigger = 1; in snd_pcm_oss_set_trigger()
2138 if (!runtime->oss.trigger) in snd_pcm_oss_set_trigger()
2140 runtime->oss.trigger = 0; in snd_pcm_oss_set_trigger()
2143 runtime->oss.prepare = 1; in snd_pcm_oss_set_trigger()
2146 mutex_unlock(&runtime->oss.params_lock); in snd_pcm_oss_set_trigger()
2163 if (psubstream && psubstream->runtime && psubstream->runtime->oss.trigger) in snd_pcm_oss_get_trigger()
2165 if (csubstream && csubstream->runtime && csubstream->runtime->oss.trigger) in snd_pcm_oss_get_trigger()
2184 if (runtime->oss.params || runtime->oss.prepare) in snd_pcm_oss_get_odelay()
2212 if (runtime->oss.params || runtime->oss.prepare) { in snd_pcm_oss_get_ptr()
2225 fixup = runtime->oss.buffer_used; in snd_pcm_oss_get_ptr()
2229 fixup = -runtime->oss.buffer_used; in snd_pcm_oss_get_ptr()
2237 n = delay - runtime->oss.prev_hw_ptr_period; in snd_pcm_oss_get_ptr()
2241 runtime->oss.prev_hw_ptr_period = delay; in snd_pcm_oss_get_ptr()
2248 if (substream->oss.setup.buggyptr) in snd_pcm_oss_get_ptr()
2249 info.blocks = (runtime->oss.buffer_bytes - delay - fixup) / runtime->oss.period_bytes; in snd_pcm_oss_get_ptr()
2251 info.blocks = (delay + fixup) / runtime->oss.period_bytes; in snd_pcm_oss_get_ptr()
2252 info.bytes = (runtime->oss.bytes - delay) & INT_MAX; in snd_pcm_oss_get_ptr()
2255 info.blocks = delay / runtime->oss.period_bytes; in snd_pcm_oss_get_ptr()
2256 info.bytes = (runtime->oss.bytes + delay) & INT_MAX; in snd_pcm_oss_get_ptr()
2280 if (runtime->oss.params) { in snd_pcm_oss_get_space()
2286 info.fragsize = runtime->oss.period_bytes; in snd_pcm_oss_get_space()
2288 if (runtime->oss.prepare) { in snd_pcm_oss_get_space()
2290 info.bytes = runtime->oss.period_bytes * runtime->oss.periods; in snd_pcm_oss_get_space()
2291 info.fragments = runtime->oss.periods; in snd_pcm_oss_get_space()
2305 fixup = -runtime->oss.buffer_used; in snd_pcm_oss_get_space()
2309 fixup = runtime->oss.buffer_used; in snd_pcm_oss_get_space()
2314 info.fragments = info.bytes / runtime->oss.period_bytes; in snd_pcm_oss_get_space()
2350 mutex_lock(&pcm->streams[stream].oss.setup_mutex); in snd_pcm_oss_look_for_setup()
2352 for (setup = pcm->streams[stream].oss.setup_list; setup; in snd_pcm_oss_look_for_setup()
2361 mutex_unlock(&pcm->streams[stream].oss.setup_mutex); in snd_pcm_oss_look_for_setup()
2367 substream->oss.oss = 0; in snd_pcm_oss_release_substream()
2376 substream->oss.oss = 1; in snd_pcm_oss_init_substream()
2377 substream->oss.setup = *setup; in snd_pcm_oss_init_substream()
2383 runtime->oss.params = 1; in snd_pcm_oss_init_substream()
2384 runtime->oss.trigger = 1; in snd_pcm_oss_init_substream()
2385 runtime->oss.rate = 8000; in snd_pcm_oss_init_substream()
2386 mutex_init(&runtime->oss.params_lock); in snd_pcm_oss_init_substream()
2389 runtime->oss.format = AFMT_U8; in snd_pcm_oss_init_substream()
2392 runtime->oss.format = AFMT_S16_LE; in snd_pcm_oss_init_substream()
2395 runtime->oss.format = AFMT_MU_LAW; in snd_pcm_oss_init_substream()
2397 runtime->oss.channels = 1; in snd_pcm_oss_init_substream()
2398 runtime->oss.fragshift = 0; in snd_pcm_oss_init_substream()
2399 runtime->oss.maxfrags = 0; in snd_pcm_oss_init_substream()
2400 runtime->oss.subdivision = 0; in snd_pcm_oss_init_substream()
2402 atomic_set(&runtime->oss.rw_ref, 0); in snd_pcm_oss_init_substream()
2823 return runtime->oss.prev_hw_ptr_period != in snd_pcm_oss_playback_ready()
2827 runtime->oss.period_frames; in snd_pcm_oss_playback_ready()
2834 return runtime->oss.prev_hw_ptr_period != in snd_pcm_oss_capture_ready()
2838 runtime->oss.period_frames; in snd_pcm_oss_capture_ready()
2873 if (ostate != SNDRV_PCM_STATE_RUNNING && runtime->oss.trigger) { in snd_pcm_oss_poll()
2877 runtime->oss.trigger = 0; in snd_pcm_oss_poll()
2924 if (runtime->oss.params) { in snd_pcm_oss_mmap()
2934 if (runtime->oss.plugin_first != NULL) in snd_pcm_oss_mmap()
2944 runtime->oss.mmap_bytes = area->vm_end - area->vm_start; in snd_pcm_oss_mmap()
2949 runtime->oss.mmap_bytes); in snd_pcm_oss_mmap()
2966 struct snd_pcm_oss_setup *setup = pstr->oss.setup_list; in snd_pcm_oss_proc_read()
2967 mutex_lock(&pstr->oss.setup_mutex); in snd_pcm_oss_proc_read()
2981 mutex_unlock(&pstr->oss.setup_mutex); in snd_pcm_oss_proc_read()
2988 for (setup = pstr->oss.setup_list, pstr->oss.setup_list = NULL; in snd_pcm_oss_proc_free_setup_list()
2994 pstr->oss.setup_list = NULL; in snd_pcm_oss_proc_free_setup_list()
3007 mutex_lock(&pstr->oss.setup_mutex); in snd_pcm_oss_proc_write()
3012 mutex_unlock(&pstr->oss.setup_mutex); in snd_pcm_oss_proc_write()
3015 for (setup = pstr->oss.setup_list; setup; setup = setup->next) { in snd_pcm_oss_proc_write()
3052 mutex_unlock(&pstr->oss.setup_mutex); in snd_pcm_oss_proc_write()
3055 if (pstr->oss.setup_list == NULL) in snd_pcm_oss_proc_write()
3056 pstr->oss.setup_list = setup; in snd_pcm_oss_proc_write()
3058 for (setup1 = pstr->oss.setup_list; in snd_pcm_oss_proc_write()
3066 mutex_unlock(&pstr->oss.setup_mutex); in snd_pcm_oss_proc_write()
3071 mutex_unlock(&pstr->oss.setup_mutex); in snd_pcm_oss_proc_write()
3095 pstr->oss.proc_entry = entry; in snd_pcm_oss_proc_init()
3104 snd_info_free_entry(pstr->oss.proc_entry); in snd_pcm_oss_proc_done()
3105 pstr->oss.proc_entry = NULL; in snd_pcm_oss_proc_done()
3148 pcm->oss.reg = 0; in snd_pcm_oss_register_minor()
3162 pcm->oss.reg++; in snd_pcm_oss_register_minor()
3163 pcm->oss.reg_mask |= 1; in snd_pcm_oss_register_minor()
3167 pcm->oss.reg++; in snd_pcm_oss_register_minor()
3168 pcm->oss.reg_mask |= 2; in snd_pcm_oss_register_minor()
3171 if (pcm->oss.reg) in snd_pcm_oss_register_minor()
3179 if (pcm->oss.reg) { in snd_pcm_oss_disconnect_minor()
3180 if (pcm->oss.reg_mask & 1) { in snd_pcm_oss_disconnect_minor()
3181 pcm->oss.reg_mask &= ~1; in snd_pcm_oss_disconnect_minor()
3185 if (pcm->oss.reg_mask & 2) { in snd_pcm_oss_disconnect_minor()
3186 pcm->oss.reg_mask &= ~2; in snd_pcm_oss_disconnect_minor()
3195 pcm->oss.reg = 0; in snd_pcm_oss_disconnect_minor()