@@ -466,6 +466,7 @@ static void virtio_snd_read_pcm_prepare(const virtio_snd_pcm_hdr_t *query,
466466static void virtio_snd_read_pcm_start (const virtio_snd_pcm_hdr_t * query ,
467467 uint32_t * plen )
468468{
469+ fprintf (stderr , "start virtio_snd_read_pcm_start\n" );
469470 const virtio_snd_pcm_hdr_t * request = query ;
470471 uint32_t stream_id = request -> stream_id ;
471472 uint32_t code = vsnd_props [stream_id ].pp .hdr .hdr .code ;
@@ -484,12 +485,13 @@ static void virtio_snd_read_pcm_start(const virtio_snd_pcm_hdr_t *query,
484485 pthread_cond_signal (& virtio_snd_ctrl_cond );
485486
486487 * plen = 0 ;
487- fprintf (stderr , "virtio_snd_read_pcm_start\n" );
488+ fprintf (stderr , "end virtio_snd_read_pcm_start\n" );
488489}
489490
490491static void virtio_snd_read_pcm_stop (const virtio_snd_pcm_hdr_t * query ,
491492 uint32_t * plen )
492493{
494+ fprintf (stderr , "start virtio_snd_read_pcm_stop\n" );
493495 const virtio_snd_pcm_hdr_t * request = query ;
494496 uint32_t stream_id = request -> stream_id ;
495497 uint32_t code = vsnd_props [stream_id ].pp .hdr .hdr .code ;
@@ -507,7 +509,7 @@ static void virtio_snd_read_pcm_stop(const virtio_snd_pcm_hdr_t *query,
507509 pthread_cond_signal (& virtio_snd_ctrl_cond );
508510
509511 * plen = 0 ;
510- fprintf (stderr , "virtio_snd_read_pcm_stop\n" );
512+ fprintf (stderr , "end virtio_snd_read_pcm_stop\n" );
511513}
512514
513515static void virtio_snd_read_pcm_release (const virtio_snd_pcm_hdr_t * query ,
@@ -530,20 +532,6 @@ static void virtio_snd_read_pcm_release(const virtio_snd_pcm_hdr_t *query,
530532 fprintf (stderr , "pass CNFAclose\n" );
531533
532534 /* Tear down the PCM frames. */
533- virtio_snd_pcm_frame_t * t = NULL ;
534- struct queue_head * frame_q = & (vsnd_props [stream_id ].pcm_frames_q );
535- virtio_snd_pcm_frame_t * frame = vsnd_props [stream_id ].pcm_frames ;
536- int idx = 0 ;
537- queue_for_each_entry_safe (frame , t , frame_q , q )
538- {
539- free (frame -> buf );
540- queue_del (& frame -> q );
541- free (frame );
542-
543- fprintf (stderr , "tear down frame %d\n" , idx );
544- idx ++ ;
545- }
546- assert (queue_empty (frame_q ));
547535
548536 * plen = 0 ;
549537 fprintf (stderr , "virtio_snd_read_pcm_release\n" );
0 commit comments