Skip to content

Commit bdbf7d1

Browse files
committed
fix
1 parent b43d873 commit bdbf7d1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ A minimalist RISC-V system emulator capable of running Linux the kernel and corr
1212
- Three types of I/O support using VirtIO standard:
1313
- virtio-blk acquires disk image from the host.
1414
- virtio-net is mapped as TAP interface.
15-
- virtio-snd uses [PortAudio](https://github.com/PortAudio/portaudio) for sound playback and capture on the host with one limitations:
15+
- virtio-snd uses [PortAudio](https://github.com/PortAudio/portaudio) for sound playback and capture on the host with one limitation:
1616
- As a confirmed issue that `semu` cannot send/receive PCM frames in time, causing
1717
the ALSA stack stuck in XRUN state until `semu` being rebooted.
1818
- For playback, you can try to adjust the buffer size to more than four times of period size.
1919
- For instance, the following buffer/period size settings on `aplay` has been tested
2020
with broken and stutter effects yet complete with no any errors: `aplay --buffer-size=32768 --period-size=4096 /usr/share/sounds/alsa/Front_Center.wav`.
21-
- For capture, ALSA usually stucks in XRUN state, so you may try more times and pray for your own luck.
21+
- For capture, ALSA usually get stuck in XRUN state, so you may need to try multiple times.
2222

2323
## Prerequisites
2424

virtio-snd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ static void virtio_snd_read_pcm_prepare(const virtio_snd_pcm_hdr_t *query,
831831
goto pa_err;
832832
} else if (dir == VIRTIO_SND_D_INPUT) {
833833
PaStreamParameters params = {
834-
.device = Pa_GetDefaultOutputDevice(),
834+
.device = Pa_GetDefaultInputDevice(),
835835
.channelCount = props->pp.channels,
836836
.sampleFormat = paInt16, /* FIXME: set mapping of format */
837837
.hostApiSpecificStreamInfo = NULL,

0 commit comments

Comments
 (0)