hw/audio/hda-codec: Avoid forward-declaring HDAAudioState

To avoid forward-declaring HDAAudioState, declare HDA_AUDIO QOM
definitions before its use in the HDAAudioStream structure.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230220131837.26292-2-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2023-01-06 22:06:36 +01:00
parent 2dbf9dd80b
commit acab7d6022

View File

@ -145,7 +145,9 @@ static const char *fmt2name[] = {
[ AUDIO_FORMAT_S32 ] = "PCM-S32", [ AUDIO_FORMAT_S32 ] = "PCM-S32",
}; };
typedef struct HDAAudioState HDAAudioState; #define TYPE_HDA_AUDIO "hda-audio"
OBJECT_DECLARE_SIMPLE_TYPE(HDAAudioState, HDA_AUDIO)
typedef struct HDAAudioStream HDAAudioStream; typedef struct HDAAudioStream HDAAudioStream;
struct HDAAudioStream { struct HDAAudioStream {
@ -171,9 +173,6 @@ struct HDAAudioStream {
int64_t buft_start; int64_t buft_start;
}; };
#define TYPE_HDA_AUDIO "hda-audio"
OBJECT_DECLARE_SIMPLE_TYPE(HDAAudioState, HDA_AUDIO)
struct HDAAudioState { struct HDAAudioState {
HDACodecDevice hda; HDACodecDevice hda;
const char *name; const char *name;