Date: Sun, 31 Jul 2016 21:48:18 GMT From: iateaca@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r307037 - soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve Message-ID: <201607312148.u6VLmIgO003401@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: iateaca Date: Sun Jul 31 21:48:18 2016 New Revision: 307037 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=307037 Log: improve logging (print the number of fragments and the fragmentsize after set the audio parameters) M bhyve/audio.c M bhyve/hda_codec.c Modified: soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/audio.c soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/hda_codec.c Modified: soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/audio.c ============================================================================== --- soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/audio.c Sun Jul 31 20:13:00 2016 (r307036) +++ soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/audio.c Sun Jul 31 21:48:18 2016 (r307037) @@ -63,6 +63,9 @@ int audio_fd = -1; int format, channels, rate; int err; +#if DEBUG_HDA == 1 + audio_buf_info info; +#endif assert(aud); assert(params); @@ -126,6 +129,14 @@ return -1; } +#if DEBUG_HDA == 1 + err = ioctl(audio_fd, aud->dir ? SNDCTL_DSP_GETOSPACE : SNDCTL_DSP_GETISPACE, &info); + if (err == -1) { + DPRINTF("Fail to get audio buf info errno: %d\n", errno); + return -1; + } + DPRINTF("fragstotal: 0x%x fragsize: 0x%x\n", info.fragstotal, info.fragsize); +#endif return 0; } Modified: soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/hda_codec.c ============================================================================== --- soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/hda_codec.c Sun Jul 31 20:13:00 2016 (r307036) +++ soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/hda_codec.c Sun Jul 31 21:48:18 2016 (r307037) @@ -656,7 +656,7 @@ uint8_t mute = 0; uint8_t gain = 0; - DPRINTF("verb: 0x%x, payload, 0x%x\n", verb, payload); + DPRINTF("%s verb: 0x%x, payload, 0x%x\n", st->actx.name, verb, payload); switch (verb) { case HDA_CMD_VERB_GET_CONV_FMT:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607312148.u6VLmIgO003401>