* [Qemu-devel] [PULL 0/1] hda-codec: disable streams on reset @ 2014-01-21 10:19 Gerd Hoffmann 2014-01-21 10:19 ` [Qemu-devel] [PATCH 1/1] " Gerd Hoffmann 0 siblings, 1 reply; 3+ messages in thread From: Gerd Hoffmann @ 2014-01-21 10:19 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, Audio patch queue with a single fix. please pull, Gerd The following changes since commit 1cf892ca2689c84960b4ce4d2723b6bee453711c: SPARC: Fix LEON3 power down instruction (2014-01-15 15:37:33 +1000) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-audio-2 for you to fetch changes up to 39e6a38cdd4b235b2918b4977f31fde2c0da3bc4: hda-codec: disable streams on reset (2014-01-20 12:17:20 +0100) ---------------------------------------------------------------- hda-codec: disable streams on reset ---------------------------------------------------------------- Gerd Hoffmann (1): hda-codec: disable streams on reset hw/audio/hda-codec.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 1/1] hda-codec: disable streams on reset 2014-01-21 10:19 [Qemu-devel] [PULL 0/1] hda-codec: disable streams on reset Gerd Hoffmann @ 2014-01-21 10:19 ` Gerd Hoffmann 2014-01-21 10:24 ` Andreas Färber 0 siblings, 1 reply; 3+ messages in thread From: Gerd Hoffmann @ 2014-01-21 10:19 UTC (permalink / raw) To: qemu-devel; +Cc: Vassili Karpov (malc), Gerd Hoffmann Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/audio/hda-codec.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 07a43bf..986f2a9 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -559,6 +559,21 @@ static int hda_audio_post_load(void *opaque, int version) return 0; } +static void hda_audio_reset(DeviceState *dev) +{ + HDAAudioState *a = DO_UPCAST(HDAAudioState, hda.qdev, dev); + HDAAudioStream *st; + int i; + + dprint(a, 1, "%s\n", __func__); + for (i = 0; i < ARRAY_SIZE(a->st); i++) { + st = a->st + i; + if (st->node != NULL) { + hda_audio_set_running(st, false); + } + } +} + static const VMStateDescription vmstate_hda_audio_stream = { .name = "hda-audio-stream", .version_id = 1, @@ -640,6 +655,7 @@ static void hda_audio_output_class_init(ObjectClass *klass, void *data) k->stream = hda_audio_stream; set_bit(DEVICE_CATEGORY_SOUND, dc->categories); dc->desc = "HDA Audio Codec, output-only (line-out)"; + dc->reset = hda_audio_reset; dc->vmsd = &vmstate_hda_audio; dc->props = hda_audio_properties; } @@ -662,6 +678,7 @@ static void hda_audio_duplex_class_init(ObjectClass *klass, void *data) k->stream = hda_audio_stream; set_bit(DEVICE_CATEGORY_SOUND, dc->categories); dc->desc = "HDA Audio Codec, duplex (line-out, line-in)"; + dc->reset = hda_audio_reset; dc->vmsd = &vmstate_hda_audio; dc->props = hda_audio_properties; } @@ -684,6 +701,7 @@ static void hda_audio_micro_class_init(ObjectClass *klass, void *data) k->stream = hda_audio_stream; set_bit(DEVICE_CATEGORY_SOUND, dc->categories); dc->desc = "HDA Audio Codec, duplex (speaker, microphone)"; + dc->reset = hda_audio_reset; dc->vmsd = &vmstate_hda_audio; dc->props = hda_audio_properties; } -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] hda-codec: disable streams on reset 2014-01-21 10:19 ` [Qemu-devel] [PATCH 1/1] " Gerd Hoffmann @ 2014-01-21 10:24 ` Andreas Färber 0 siblings, 0 replies; 3+ messages in thread From: Andreas Färber @ 2014-01-21 10:24 UTC (permalink / raw) To: Gerd Hoffmann, qemu-devel; +Cc: Vassili Karpov (malc) Am 21.01.2014 11:19, schrieb Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > hw/audio/hda-codec.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c > index 07a43bf..986f2a9 100644 > --- a/hw/audio/hda-codec.c > +++ b/hw/audio/hda-codec.c > @@ -559,6 +559,21 @@ static int hda_audio_post_load(void *opaque, int version) > return 0; > } > > +static void hda_audio_reset(DeviceState *dev) > +{ > + HDAAudioState *a = DO_UPCAST(HDAAudioState, hda.qdev, dev); [snip] Can you please follow up with a QOM cast macro to avoid adding more DO_UPCAST() usages? Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-21 10:25 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-01-21 10:19 [Qemu-devel] [PULL 0/1] hda-codec: disable streams on reset Gerd Hoffmann 2014-01-21 10:19 ` [Qemu-devel] [PATCH 1/1] " Gerd Hoffmann 2014-01-21 10:24 ` Andreas Färber
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).