Skip to content

Commit 7d4667d

Browse files
committed
Remove PCM state debug message
1 parent 9f65386 commit 7d4667d

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

virtio-snd.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ typedef struct {
294294
virtio_snd_chmap_info_t c;
295295
virtio_snd_pcm_set_params_t pp;
296296
struct CNFADriver *audio_host;
297-
bool is_guest_playing;
298297

299298
// PCM frame queue lock
300299
virtio_snd_queue_lock_t lock;
@@ -307,10 +306,6 @@ typedef struct {
307306
// playback control
308307
vsnd_stream_sel_t v;
309308
} virtio_snd_prop_t;
310-
#define VSND_COMPILER_BARRIER \
311-
do { \
312-
asm("" ::: "memory"); \
313-
} while (0)
314309

315310
static virtio_snd_config_t vsnd_configs[VSND_DEV_CNT_MAX];
316311
static virtio_snd_prop_t vsnd_props[VSND_DEV_CNT_MAX] = {
@@ -476,15 +471,7 @@ static void virtio_snd_read_pcm_set_params(
476471
props->pp.rate = request->rate;
477472
props->pp.padding = request->padding;
478473

479-
fprintf(stderr,
480-
"pcm_set_params rate %d"
481-
" period_bytes %" PRIu32 " buffer_bytes %" PRIu32
482-
" channels %" PRIu32 "\n",
483-
pcm_rate_tbl[props->pp.rate], props->pp.period_bytes,
484-
props->pp.buffer_bytes, props->pp.channels);
485-
486474
*plen = 0;
487-
fprintf(stderr, "virtio_snd_read_pcm_set_params\n");
488475
}
489476

490477
static void virtio_snd_read_pcm_prepare(const virtio_snd_pcm_hdr_t *query,
@@ -518,10 +505,6 @@ static void virtio_snd_read_pcm_prepare(const virtio_snd_pcm_hdr_t *query,
518505
uint32_t cnfa_period_bytes = bps_rate / 10;
519506
// Calculate the period size (in frames) for CNFA
520507
uint32_t cnfa_period_frames = cnfa_period_bytes / VSND_CNFA_FRAME_SZ;
521-
fprintf(stderr,
522-
"bps_rate %" PRIu32 " cnfa_period_bytes %" PRIu32
523-
" cnfa_period_frames %" PRIu32 "\n",
524-
bps_rate, cnfa_period_bytes, cnfa_period_frames);
525508
uint32_t period_frames = period_bytes / VSND_CNFA_FRAME_SZ;
526509

527510
/* The buffer size in frames when calling CNFAInit()
@@ -542,13 +525,11 @@ static void virtio_snd_read_pcm_prepare(const virtio_snd_pcm_hdr_t *query,
542525
(void *) malloc(sizeof(*props->intermediate) * cnfa_period_bytes);
543526

544527
*plen = 0;
545-
fprintf(stderr, "virtio_snd_read_pcm_prepare\n");
546528
}
547529

548530
static void virtio_snd_read_pcm_start(const virtio_snd_pcm_hdr_t *query,
549531
uint32_t *plen)
550532
{
551-
fprintf(stderr, "start virtio_snd_read_pcm_start\n");
552533
const virtio_snd_pcm_hdr_t *request = query;
553534
uint32_t stream_id = request->stream_id;
554535
uint32_t code = vsnd_props[stream_id].pp.hdr.hdr.code;
@@ -568,13 +549,11 @@ static void virtio_snd_read_pcm_start(const virtio_snd_pcm_hdr_t *query,
568549
pthread_cond_signal(&props->v.ctrl_cond);
569550

570551
*plen = 0;
571-
fprintf(stderr, "end virtio_snd_read_pcm_start\n");
572552
}
573553

574554
static void virtio_snd_read_pcm_stop(const virtio_snd_pcm_hdr_t *query,
575555
uint32_t *plen)
576556
{
577-
fprintf(stderr, "start virtio_snd_read_pcm_stop\n");
578557
const virtio_snd_pcm_hdr_t *request = query;
579558
uint32_t stream_id = request->stream_id;
580559
uint32_t code = vsnd_props[stream_id].pp.hdr.hdr.code;
@@ -593,13 +572,11 @@ static void virtio_snd_read_pcm_stop(const virtio_snd_pcm_hdr_t *query,
593572
pthread_cond_signal(&props->v.ctrl_cond);
594573

595574
*plen = 0;
596-
fprintf(stderr, "end virtio_snd_read_pcm_stop\n");
597575
}
598576

599577
static void virtio_snd_read_pcm_release(const virtio_snd_pcm_hdr_t *query,
600578
uint32_t *plen)
601579
{
602-
fprintf(stderr, "virtio_snd_read_pcm_release start\n");
603580
const virtio_snd_pcm_hdr_t *request = query;
604581
uint32_t stream_id = request->stream_id;
605582
virtio_snd_prop_t *props = &vsnd_props[stream_id];
@@ -631,14 +608,12 @@ static void virtio_snd_read_pcm_release(const virtio_snd_pcm_hdr_t *query,
631608
}
632609

633610
CNFAClose(props->audio_host);
634-
fprintf(stderr, "pass CNFAclose\n");
635611

636612
/* Tear down stream related locking attributes. */
637613
pthread_mutex_destroy(&props->v.ctrl_mutex);
638614
pthread_cond_destroy(&props->v.ctrl_cond);
639615

640616
*plen = 0;
641-
fprintf(stderr, "virtio_snd_read_pcm_release\n");
642617
}
643618

644619
static void __virtio_snd_frame_dequeue(short *out,

0 commit comments

Comments
 (0)