Skip to content

Commit

Permalink
Reset device with init props
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuda-Chen committed Oct 10, 2024
1 parent 509387e commit 347e761
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions virtio-snd.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,15 @@ static void virtio_snd_update_status(virtio_snd_state_t *vsnd, uint32_t status)
/* Reset */
uint32_t *ram = vsnd->ram;
void *priv = vsnd->priv;
uint32_t jacks = PRIV(vsnd)->jacks;
uint32_t streams = PRIV(vsnd)->streams;
uint32_t chmaps = PRIV(vsnd)->chmaps;
memset(vsnd, 0, sizeof(*vsnd));
vsnd->ram = ram;
vsnd->priv = priv;
PRIV(vsnd)->jacks = jacks;
PRIV(vsnd)->streams = streams;
PRIV(vsnd)->chmaps = chmaps;
}

static void virtio_snd_read_jack_info_handler(
Expand Down

0 comments on commit 347e761

Please sign in to comment.