[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/audio: Fix logic error in hda audio
|
From: |
Marc-André Lureau |
|
Subject: |
Re: [PATCH] hw/audio: Fix logic error in hda audio |
|
Date: |
Mon, 20 Nov 2023 12:16:48 +0400 |
On Thu, Nov 16, 2023 at 1:48 PM zhouyang23 via <qemu-devel@nongnu.org> wrote:
>
> Commit b7639b7dd0 introduced a logic error about mixer and nomixer.
> Cause use micro_mixemu when there is no mixer in HDAAudioState, but
> use micro_nomixemu wehen there has a mixer in HDAAuditState.
>
> Signed-off-by: zhouyang23 <zhouyang23@xiaomi.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> hw/audio/hda-codec.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c
> index b9ad1f4c39..87bacb3bee 100644
> --- a/hw/audio/hda-codec.c
> +++ b/hw/audio/hda-codec.c
> @@ -857,7 +857,7 @@ 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) {
> + if (a->mixer) {
> desc = &output_mixemu;
> }
>
> @@ -869,7 +869,7 @@ 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) {
> + if (a->mixer) {
> desc = &duplex_mixemu;
> }
>
> @@ -881,7 +881,7 @@ static void hda_audio_init_micro(HDACodecDevice *hda,
> Error **errp)
> HDAAudioState *a = HDA_AUDIO(hda);
> const struct desc_codec *desc = µ_nomixemu;
>
> - if (!a->mixer) {
> + if (a->mixer) {
> desc = µ_mixemu;
> }
>
> --
> 2.34.1
>
>
--
Marc-André Lureau