|
@@ -675,7 +675,9 @@ static void hda_audio_stream(HDACodecDevice *hda, uint32_t stnr, bool running, b
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static int hda_audio_init(HDACodecDevice *hda, const struct desc_codec *desc)
|
|
|
+static void hda_audio_init(HDACodecDevice *hda,
|
|
|
+ const struct desc_codec *desc,
|
|
|
+ Error **errp)
|
|
|
{
|
|
|
HDAAudioState *a = HDA_AUDIO(hda);
|
|
|
HDAAudioStream *st;
|
|
@@ -718,7 +720,6 @@ static int hda_audio_init(HDACodecDevice *hda, const struct desc_codec *desc)
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- return 0;
|
|
|
}
|
|
|
|
|
|
static void hda_audio_exit(HDACodecDevice *hda)
|
|
@@ -848,37 +849,40 @@ static Property hda_audio_properties[] = {
|
|
|
DEFINE_PROP_END_OF_LIST(),
|
|
|
};
|
|
|
|
|
|
-static int hda_audio_init_output(HDACodecDevice *hda)
|
|
|
+static void hda_audio_init_output(HDACodecDevice *hda, Error **errp)
|
|
|
{
|
|
|
HDAAudioState *a = HDA_AUDIO(hda);
|
|
|
+ const struct desc_codec *desc = &output_nomixemu;
|
|
|
|
|
|
if (!a->mixer) {
|
|
|
- return hda_audio_init(hda, &output_nomixemu);
|
|
|
- } else {
|
|
|
- return hda_audio_init(hda, &output_mixemu);
|
|
|
+ desc = &output_mixemu;
|
|
|
}
|
|
|
+
|
|
|
+ hda_audio_init(hda, desc, errp);
|
|
|
}
|
|
|
|
|
|
-static int hda_audio_init_duplex(HDACodecDevice *hda)
|
|
|
+static void hda_audio_init_duplex(HDACodecDevice *hda, Error **errp)
|
|
|
{
|
|
|
HDAAudioState *a = HDA_AUDIO(hda);
|
|
|
+ const struct desc_codec *desc = &duplex_nomixemu;
|
|
|
|
|
|
if (!a->mixer) {
|
|
|
- return hda_audio_init(hda, &duplex_nomixemu);
|
|
|
- } else {
|
|
|
- return hda_audio_init(hda, &duplex_mixemu);
|
|
|
+ desc = &duplex_mixemu;
|
|
|
}
|
|
|
+
|
|
|
+ hda_audio_init(hda, desc, errp);
|
|
|
}
|
|
|
|
|
|
-static int hda_audio_init_micro(HDACodecDevice *hda)
|
|
|
+static void hda_audio_init_micro(HDACodecDevice *hda, Error **errp)
|
|
|
{
|
|
|
HDAAudioState *a = HDA_AUDIO(hda);
|
|
|
+ const struct desc_codec *desc = µ_nomixemu;
|
|
|
|
|
|
if (!a->mixer) {
|
|
|
- return hda_audio_init(hda, µ_nomixemu);
|
|
|
- } else {
|
|
|
- return hda_audio_init(hda, µ_mixemu);
|
|
|
+ desc = µ_mixemu;
|
|
|
}
|
|
|
+
|
|
|
+ hda_audio_init(hda, desc, errp);
|
|
|
}
|
|
|
|
|
|
static void hda_audio_base_class_init(ObjectClass *klass, void *data)
|