Lines Matching +full:no +full:- +full:read +full:- +full:rollover

1 // SPDX-License-Identifier: GPL-2.0-or-later
21 /* for art-tsc conversion */
59 return &apcm->info->stream[substream->stream]; in to_hda_pcm_stream()
69 if (!hinfo->ops.get_delay) in azx_adjust_codec_delay()
72 codec_frames = hinfo->ops.get_delay(hinfo, apcm->codec, substream); in azx_adjust_codec_delay()
74 substream->runtime->rate); in azx_adjust_codec_delay()
76 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in azx_adjust_codec_delay()
79 return (nsec > codec_nsecs) ? nsec - codec_nsecs : 0; in azx_adjust_codec_delay()
90 struct azx *chip = apcm->chip; in azx_pcm_close()
94 mutex_lock(&chip->open_mutex); in azx_pcm_close()
96 if (hinfo->ops.close) in azx_pcm_close()
97 hinfo->ops.close(hinfo, apcm->codec, substream); in azx_pcm_close()
98 snd_hda_power_down(apcm->codec); in azx_pcm_close()
99 mutex_unlock(&chip->open_mutex); in azx_pcm_close()
100 snd_hda_codec_pcm_put(apcm->info); in azx_pcm_close()
108 struct azx *chip = apcm->chip; in azx_pcm_hw_params()
115 ret = -EBUSY; in azx_pcm_hw_params()
119 azx_dev->core.bufsize = 0; in azx_pcm_hw_params()
120 azx_dev->core.period_bytes = 0; in azx_pcm_hw_params()
121 azx_dev->core.format_val = 0; in azx_pcm_hw_params()
139 snd_hda_codec_cleanup(apcm->codec, hinfo, substream); in azx_pcm_hw_free()
141 azx_stream(azx_dev)->prepared = 0; in azx_pcm_hw_free()
149 struct azx *chip = apcm->chip; in azx_pcm_prepare()
152 struct snd_pcm_runtime *runtime = substream->runtime; in azx_pcm_prepare()
156 snd_hda_spdif_out_of_nid(apcm->codec, hinfo->nid); in azx_pcm_prepare()
157 unsigned short ctls = spdif ? spdif->ctls : 0; in azx_pcm_prepare()
162 err = -EBUSY; in azx_pcm_prepare()
167 format_val = snd_hdac_calc_stream_format(runtime->rate, in azx_pcm_prepare()
168 runtime->channels, in azx_pcm_prepare()
169 runtime->format, in azx_pcm_prepare()
170 hinfo->maxbps, in azx_pcm_prepare()
173 dev_err(chip->card->dev, in azx_pcm_prepare()
175 runtime->rate, runtime->channels, runtime->format); in azx_pcm_prepare()
176 err = -EINVAL; in azx_pcm_prepare()
186 stream_tag = azx_dev->core.stream_tag; in azx_pcm_prepare()
187 /* CA-IBG chips need the playback stream starting from 1 */ in azx_pcm_prepare()
188 if ((chip->driver_caps & AZX_DCAPS_CTX_WORKAROUND) && in azx_pcm_prepare()
189 stream_tag > chip->capture_streams) in azx_pcm_prepare()
190 stream_tag -= chip->capture_streams; in azx_pcm_prepare()
191 err = snd_hda_codec_prepare(apcm->codec, hinfo, stream_tag, in azx_pcm_prepare()
192 azx_dev->core.format_val, substream); in azx_pcm_prepare()
196 azx_stream(azx_dev)->prepared = 1; in azx_pcm_prepare()
204 struct azx *chip = apcm->chip; in azx_pcm_trigger()
217 if (chip->driver_caps & AZX_DCAPS_OLD_SSYNC) in azx_pcm_trigger()
222 if (dsp_is_locked(azx_dev) || !hstr->prepared) in azx_pcm_trigger()
223 return -EPIPE; in azx_pcm_trigger()
237 return -EINVAL; in azx_pcm_trigger()
241 if (s->pcm->card != substream->pcm->card) in azx_pcm_trigger()
244 sbits |= 1 << azx_dev->core.index; in azx_pcm_trigger()
248 spin_lock(&bus->reg_lock); in azx_pcm_trigger()
254 if (s->pcm->card != substream->pcm->card) in azx_pcm_trigger()
258 azx_dev->insufficient = 1; in azx_pcm_trigger()
264 spin_unlock(&bus->reg_lock); in azx_pcm_trigger()
268 spin_lock(&bus->reg_lock); in azx_pcm_trigger()
273 spin_unlock(&bus->reg_lock); in azx_pcm_trigger()
292 struct snd_pcm_substream *substream = azx_dev->core.substream; in azx_get_position()
294 int stream = substream->stream; in azx_get_position()
297 if (chip->get_position[stream]) in azx_get_position()
298 pos = chip->get_position[stream](chip, azx_dev); in azx_get_position()
302 if (pos >= azx_dev->core.bufsize) in azx_get_position()
305 if (substream->runtime) { in azx_get_position()
309 if (chip->get_delay[stream]) in azx_get_position()
310 delay += chip->get_delay[stream](chip, azx_dev, pos); in azx_get_position()
311 if (hinfo->ops.get_delay) in azx_get_position()
312 delay += hinfo->ops.get_delay(hinfo, apcm->codec, in azx_get_position()
314 substream->runtime->delay = delay; in azx_get_position()
325 struct azx *chip = apcm->chip; in azx_pcm_pointer()
327 return bytes_to_frames(substream->runtime, in azx_pcm_pointer()
345 * rem can’t overflow because both are 32-bit values
369 struct azx *chip = apcm->chip; in azx_get_sync_time()
379 runtime = substream->runtime; in azx_get_sync_time()
381 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in azx_get_sync_time()
390 (azx_dev->core.stream_tag - 1); in azx_get_sync_time()
401 timeout--; in azx_get_sync_time()
405 dev_err(chip->card->dev, "GTSCC capture Timedout!\n"); in azx_get_sync_time()
406 return -EIO; in azx_get_sync_time()
409 /* Read wall clock counter */ in azx_get_sync_time()
412 /* Read TSC counter */ in azx_get_sync_time()
416 /* Read Link counter */ in azx_get_sync_time()
420 /* Ack: registers read done */ in azx_get_sync_time()
430 * An error occurs near frame "rollover". The clocks in in azx_get_sync_time()
435 if (wallclk_cycles < HDA_MAX_CYCLE_VALUE - HDA_MAX_CYCLE_OFFSET in azx_get_sync_time()
440 * Sleep before we read again, else we may again get in azx_get_sync_time()
449 dev_err_ratelimited(chip->card->dev, in azx_get_sync_time()
451 return -EIO; in azx_get_sync_time()
455 NSEC_PER_SEC, runtime->rate)); in azx_get_sync_time()
457 ((HDA_MAX_CYCLE_VALUE + 1) * runtime->rate)); in azx_get_sync_time()
468 return -ENXIO; in azx_get_sync_time()
482 if (runtime->hw.info & SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME) in is_link_time_supported()
483 if (ts->type_requested == SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED) in is_link_time_supported()
495 struct snd_pcm_runtime *runtime = substream->runtime; in azx_get_time_info()
500 if ((substream->runtime->hw.info & SNDRV_PCM_INFO_HAS_LINK_ATIME) && in azx_get_time_info()
501 (audio_tstamp_config->type_requested == SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK)) { in azx_get_time_info()
503 snd_pcm_gettime(substream->runtime, system_ts); in azx_get_time_info()
505 nsec = timecounter_read(&azx_dev->core.tc); in azx_get_time_info()
507 if (audio_tstamp_config->report_delay) in azx_get_time_info()
512 audio_tstamp_report->actual_type = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK; in azx_get_time_info()
513 audio_tstamp_report->accuracy_report = 1; /* rest of structure is valid */ in azx_get_time_info()
514 audio_tstamp_report->accuracy = 42; /* 24 MHz WallClock == 42ns resolution */ in azx_get_time_info()
522 switch (runtime->tstamp_type) { in azx_get_time_info()
524 return -EINVAL; in azx_get_time_info()
538 audio_tstamp_report->actual_type = in azx_get_time_info()
540 audio_tstamp_report->accuracy_report = 1; in azx_get_time_info()
542 audio_tstamp_report->accuracy = 42; in azx_get_time_info()
545 audio_tstamp_report->actual_type = SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT; in azx_get_time_info()
556 /* No full-resume yet implemented */
581 struct azx *chip = apcm->chip; in azx_pcm_open()
583 struct snd_pcm_runtime *runtime = substream->runtime; in azx_pcm_open()
587 snd_hda_codec_pcm_get(apcm->info); in azx_pcm_open()
588 mutex_lock(&chip->open_mutex); in azx_pcm_open()
592 err = -EBUSY; in azx_pcm_open()
595 runtime->private_data = azx_dev; in azx_pcm_open()
597 runtime->hw = azx_pcm_hw; in azx_pcm_open()
598 if (chip->gts_present) in azx_pcm_open()
599 runtime->hw.info |= SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME; in azx_pcm_open()
600 runtime->hw.channels_min = hinfo->channels_min; in azx_pcm_open()
601 runtime->hw.channels_max = hinfo->channels_max; in azx_pcm_open()
602 runtime->hw.formats = hinfo->formats; in azx_pcm_open()
603 runtime->hw.rates = hinfo->rates; in azx_pcm_open()
607 /* avoid wrap-around with wall-clock */ in azx_pcm_open()
616 if (chip->driver_caps & AZX_DCAPS_AMD_WORKAROUND) in azx_pcm_open()
617 runtime->hw.info |= SNDRV_PCM_INFO_BATCH; in azx_pcm_open()
619 if (chip->align_buffer_size) in azx_pcm_open()
638 snd_hda_power_up(apcm->codec); in azx_pcm_open()
639 if (hinfo->ops.open) in azx_pcm_open()
640 err = hinfo->ops.open(hinfo, apcm->codec, substream); in azx_pcm_open()
642 err = -ENODEV; in azx_pcm_open()
649 if (snd_BUG_ON(!runtime->hw.channels_min) || in azx_pcm_open()
650 snd_BUG_ON(!runtime->hw.channels_max) || in azx_pcm_open()
651 snd_BUG_ON(!runtime->hw.formats) || in azx_pcm_open()
652 snd_BUG_ON(!runtime->hw.rates)) { in azx_pcm_open()
654 if (hinfo->ops.close) in azx_pcm_open()
655 hinfo->ops.close(hinfo, apcm->codec, substream); in azx_pcm_open()
656 err = -EINVAL; in azx_pcm_open()
662 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { in azx_pcm_open()
663 runtime->hw.info &= ~SNDRV_PCM_INFO_HAS_WALL_CLOCK; /* legacy */ in azx_pcm_open()
664 runtime->hw.info &= ~SNDRV_PCM_INFO_HAS_LINK_ATIME; in azx_pcm_open()
668 mutex_unlock(&chip->open_mutex); in azx_pcm_open()
672 snd_hda_power_down(apcm->codec); in azx_pcm_open()
674 mutex_unlock(&chip->open_mutex); in azx_pcm_open()
675 snd_hda_codec_pcm_put(apcm->info); in azx_pcm_open()
683 struct azx *chip = apcm->chip; in azx_pcm_mmap()
684 if (chip->ops->pcm_mmap_prepare) in azx_pcm_mmap()
685 chip->ops->pcm_mmap_prepare(substream, area); in azx_pcm_mmap()
703 struct azx_pcm *apcm = pcm->private_data; in azx_pcm_free()
705 list_del(&apcm->list); in azx_pcm_free()
706 apcm->info->pcm = NULL; in azx_pcm_free()
716 struct hdac_bus *bus = &_bus->core; in snd_hda_attach_pcm_stream()
720 int pcm_dev = cpcm->device; in snd_hda_attach_pcm_stream()
725 list_for_each_entry(apcm, &chip->pcm_list, list) { in snd_hda_attach_pcm_stream()
726 if (apcm->pcm->device == pcm_dev) { in snd_hda_attach_pcm_stream()
727 dev_err(chip->card->dev, "PCM %d already exists\n", in snd_hda_attach_pcm_stream()
729 return -EBUSY; in snd_hda_attach_pcm_stream()
732 err = snd_pcm_new(chip->card, cpcm->name, pcm_dev, in snd_hda_attach_pcm_stream()
733 cpcm->stream[SNDRV_PCM_STREAM_PLAYBACK].substreams, in snd_hda_attach_pcm_stream()
734 cpcm->stream[SNDRV_PCM_STREAM_CAPTURE].substreams, in snd_hda_attach_pcm_stream()
738 strlcpy(pcm->name, cpcm->name, sizeof(pcm->name)); in snd_hda_attach_pcm_stream()
741 snd_device_free(chip->card, pcm); in snd_hda_attach_pcm_stream()
742 return -ENOMEM; in snd_hda_attach_pcm_stream()
744 apcm->chip = chip; in snd_hda_attach_pcm_stream()
745 apcm->pcm = pcm; in snd_hda_attach_pcm_stream()
746 apcm->codec = codec; in snd_hda_attach_pcm_stream()
747 apcm->info = cpcm; in snd_hda_attach_pcm_stream()
748 pcm->private_data = apcm; in snd_hda_attach_pcm_stream()
749 pcm->private_free = azx_pcm_free; in snd_hda_attach_pcm_stream()
750 if (cpcm->pcm_type == HDA_PCM_TYPE_MODEM) in snd_hda_attach_pcm_stream()
751 pcm->dev_class = SNDRV_PCM_CLASS_MODEM; in snd_hda_attach_pcm_stream()
752 list_add_tail(&apcm->list, &chip->pcm_list); in snd_hda_attach_pcm_stream()
753 cpcm->pcm = pcm; in snd_hda_attach_pcm_stream()
755 if (cpcm->stream[s].substreams) in snd_hda_attach_pcm_stream()
758 /* buffer pre-allocation */ in snd_hda_attach_pcm_stream()
762 if (chip->uc_buffer) in snd_hda_attach_pcm_stream()
764 snd_pcm_set_managed_buffer_all(pcm, type, chip->card->dev, in snd_hda_attach_pcm_stream()
786 struct hda_bus *hbus = &chip->bus; in azx_rirb_get_response()
794 if (hbus->no_response_fallback) in azx_rirb_get_response()
795 return -EIO; in azx_rirb_get_response()
797 if (!bus->polling_mode) { in azx_rirb_get_response()
798 dev_warn(chip->card->dev, in azx_rirb_get_response()
800 bus->last_cmd[addr]); in azx_rirb_get_response()
801 bus->polling_mode = 1; in azx_rirb_get_response()
805 if (chip->msi) { in azx_rirb_get_response()
806 dev_warn(chip->card->dev, in azx_rirb_get_response()
807 "No response from codec, disabling MSI: last cmd=0x%08x\n", in azx_rirb_get_response()
808 bus->last_cmd[addr]); in azx_rirb_get_response()
809 if (chip->ops->disable_msi_reset_irq && in azx_rirb_get_response()
810 chip->ops->disable_msi_reset_irq(chip) < 0) in azx_rirb_get_response()
811 return -EIO; in azx_rirb_get_response()
815 if (chip->probing) { in azx_rirb_get_response()
817 * phase, this is likely an access to a non-existing codec in azx_rirb_get_response()
820 return -EIO; in azx_rirb_get_response()
823 /* no fallback mechanism? */ in azx_rirb_get_response()
824 if (!chip->fallback_to_single_cmd) in azx_rirb_get_response()
825 return -EIO; in azx_rirb_get_response()
830 if (hbus->allow_bus_reset && !hbus->response_reset && !hbus->in_reset) { in azx_rirb_get_response()
831 hbus->response_reset = 1; in azx_rirb_get_response()
832 dev_err(chip->card->dev, in azx_rirb_get_response()
833 "No response from codec, resetting bus: last cmd=0x%08x\n", in azx_rirb_get_response()
834 bus->last_cmd[addr]); in azx_rirb_get_response()
835 return -EAGAIN; /* give a chance to retry */ in azx_rirb_get_response()
838 dev_err(chip->card->dev, in azx_rirb_get_response()
840 bus->last_cmd[addr]); in azx_rirb_get_response()
841 chip->single_cmd = 1; in azx_rirb_get_response()
842 hbus->response_reset = 0; in azx_rirb_get_response()
844 return -EIO; in azx_rirb_get_response()
862 while (timeout--) { in azx_single_wait_for_response()
866 azx_bus(chip)->rirb.res[addr] = azx_readl(chip, IR); in azx_single_wait_for_response()
872 dev_dbg(chip->card->dev, "get_response timeout: IRS=0x%x\n", in azx_single_wait_for_response()
874 azx_bus(chip)->rirb.res[addr] = -1; in azx_single_wait_for_response()
875 return -EIO; in azx_single_wait_for_response()
885 bus->last_cmd[azx_command_addr(val)] = val; in azx_single_send_cmd()
886 while (timeout--) { in azx_single_send_cmd()
900 dev_dbg(chip->card->dev, in azx_single_send_cmd()
903 return -EIO; in azx_single_send_cmd()
911 *res = bus->rirb.res[addr]; in azx_single_get_response()
918 * They are just the skeleton to call sub-callbacks according to the
919 * current setting of chip->single_cmd.
927 if (chip->disabled) in azx_send_cmd()
929 if (chip->single_cmd) in azx_send_cmd()
941 if (chip->disabled) in azx_get_response()
943 if (chip->single_cmd) in azx_get_response()
966 list_for_each_entry(s, &bus->stream_list, list) in azx_get_dsp_loader_dev()
967 if (s->index == chip->playback_index_offset) in azx_get_dsp_loader_dev()
977 struct hdac_bus *bus = &codec->bus->core; in snd_hda_codec_load_dsp_prepare()
986 spin_lock_irq(&bus->reg_lock); in snd_hda_codec_load_dsp_prepare()
987 if (hstr->opened) { in snd_hda_codec_load_dsp_prepare()
988 chip->saved_azx_dev = *azx_dev; in snd_hda_codec_load_dsp_prepare()
991 spin_unlock_irq(&bus->reg_lock); in snd_hda_codec_load_dsp_prepare()
995 spin_lock_irq(&bus->reg_lock); in snd_hda_codec_load_dsp_prepare()
997 *azx_dev = chip->saved_azx_dev; in snd_hda_codec_load_dsp_prepare()
998 spin_unlock_irq(&bus->reg_lock); in snd_hda_codec_load_dsp_prepare()
1002 hstr->prepared = 0; in snd_hda_codec_load_dsp_prepare()
1009 struct hdac_bus *bus = &codec->bus->core; in snd_hda_codec_load_dsp_trigger()
1020 struct hdac_bus *bus = &codec->bus->core; in snd_hda_codec_load_dsp_cleanup()
1025 if (!dmab->area || !hstr->locked) in snd_hda_codec_load_dsp_cleanup()
1029 spin_lock_irq(&bus->reg_lock); in snd_hda_codec_load_dsp_cleanup()
1030 if (hstr->opened) in snd_hda_codec_load_dsp_cleanup()
1031 *azx_dev = chip->saved_azx_dev; in snd_hda_codec_load_dsp_cleanup()
1032 hstr->locked = false; in snd_hda_codec_load_dsp_cleanup()
1033 spin_unlock_irq(&bus->reg_lock); in snd_hda_codec_load_dsp_cleanup()
1045 if (chip->driver_caps & AZX_DCAPS_CTX_WORKAROUND) in azx_init_chip()
1056 list_for_each_entry(s, &bus->stream_list, list) in azx_stop_all_streams()
1076 if (!chip->ops->position_check || in stream_update()
1077 chip->ops->position_check(chip, azx_dev)) { in stream_update()
1078 spin_unlock(&bus->reg_lock); in stream_update()
1079 snd_pcm_period_elapsed(azx_stream(azx_dev)->substream); in stream_update()
1080 spin_lock(&bus->reg_lock); in stream_update()
1094 if (!pm_runtime_active(chip->card->dev)) in azx_interrupt()
1098 spin_lock(&bus->reg_lock); in azx_interrupt()
1100 if (chip->disabled) in azx_interrupt()
1116 * Clearing the interrupt status here ensures that no in azx_interrupt()
1117 * interrupt gets masked after the RIRB wp is read in in azx_interrupt()
1126 if (chip->driver_caps & AZX_DCAPS_CTX_WORKAROUND) in azx_interrupt()
1134 spin_unlock(&bus->reg_lock); in azx_interrupt()
1153 unsigned int res = -1; in probe_codec()
1155 mutex_lock(&bus->cmd_mutex); in probe_codec()
1156 chip->probing = 1; in probe_codec()
1159 chip->probing = 0; in probe_codec()
1160 mutex_unlock(&bus->cmd_mutex); in probe_codec()
1161 if (err < 0 || res == -1) in probe_codec()
1162 return -EIO; in probe_codec()
1163 dev_dbg(chip->card->dev, "codec #%d probed OK\n", addr); in probe_codec()
1169 struct azx *chip = bus_to_azx(&bus->core); in snd_hda_bus_reset()
1171 bus->in_reset = 1; in snd_hda_bus_reset()
1174 if (bus->core.chip_init) in snd_hda_bus_reset()
1176 bus->in_reset = 0; in snd_hda_bus_reset()
1179 /* HD-audio bus initialization */
1182 struct hda_bus *bus = &chip->bus; in azx_bus_init()
1185 err = snd_hdac_bus_init(&bus->core, chip->card->dev, &bus_core_ops); in azx_bus_init()
1189 bus->card = chip->card; in azx_bus_init()
1190 mutex_init(&bus->prepare_mutex); in azx_bus_init()
1191 bus->pci = chip->pci; in azx_bus_init()
1192 bus->modelname = model; in azx_bus_init()
1193 bus->mixer_assigned = -1; in azx_bus_init()
1194 bus->core.snoop = azx_snoop(chip); in azx_bus_init()
1195 if (chip->get_position[0] != azx_get_pos_lpib || in azx_bus_init()
1196 chip->get_position[1] != azx_get_pos_lpib) in azx_bus_init()
1197 bus->core.use_posbuf = true; in azx_bus_init()
1198 bus->core.bdl_pos_adj = chip->bdl_pos_adj; in azx_bus_init()
1199 if (chip->driver_caps & AZX_DCAPS_CORBRP_SELF_CLEAR) in azx_bus_init()
1200 bus->core.corbrp_self_clear = true; in azx_bus_init()
1202 if (chip->driver_caps & AZX_DCAPS_4K_BDLE_BOUNDARY) in azx_bus_init()
1203 bus->core.align_bdle_4k = true; in azx_bus_init()
1206 bus->core.sync_write = 1; in azx_bus_init()
1224 if ((bus->codec_mask & (1 << c)) & chip->codec_probe_mask) { in azx_probe_codecs()
1229 dev_warn(chip->card->dev, in azx_probe_codecs()
1231 bus->codec_mask &= ~(1 << c); in azx_probe_codecs()
1232 /* More badly, accessing to a non-existing in azx_probe_codecs()
1247 if ((bus->codec_mask & (1 << c)) & chip->codec_probe_mask) { in azx_probe_codecs()
1249 err = snd_hda_codec_new(&chip->bus, chip->card, c, &codec); in azx_probe_codecs()
1252 codec->jackpoll_interval = chip->jackpoll_interval; in azx_probe_codecs()
1253 codec->beep_mode = chip->beep_mode; in azx_probe_codecs()
1258 dev_err(chip->card->dev, "no codecs initialized\n"); in azx_probe_codecs()
1259 return -ENXIO; in azx_probe_codecs()
1273 list_for_each_codec_safe(codec, next, &chip->bus) { in azx_codec_configure()
1277 if (!azx_bus(chip)->num_codecs) in azx_codec_configure()
1278 return -ENODEV; in azx_codec_configure()
1285 if (index >= chip->capture_index_offset && in stream_direction()
1286 index < chip->capture_index_offset + chip->capture_streams) in stream_direction()
1301 for (i = 0; i < chip->num_streams; i++) { in azx_init_streams()
1306 return -ENOMEM; in azx_init_streams()
1315 if (chip->driver_caps & AZX_DCAPS_SEPARATE_STREAM_TAG) in azx_init_streams()
1332 while (!list_empty(&bus->stream_list)) { in azx_free_streams()
1333 s = list_first_entry(&bus->stream_list, struct hdac_stream, list); in azx_free_streams()
1334 list_del(&s->list); in azx_free_streams()