All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Philippe Mathieu-Daudé" <philmd@mailo.com>,
	"Jan Kiszka" <jan.kiszka@web.de>
Subject: Re: [PATCH 4/5] hw: Remove Marvell 88W8618 devices
Date: Thu, 20 Aug 2026 12:59:26 +0200	[thread overview]
Message-ID: <6a3faf4b-2b03-48ce-aa85-0406e0ec4b67@oss.qualcomm.com> (raw)
In-Reply-To: <20260819185430.3467629-5-peter.maydell@linaro.org>

On 19/8/26 20:54, Peter Maydell wrote:
> The mv88w8618 ethernet and audio devices were used only by the
> now-removed musicpal machine, so can also be deleted.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   hw/arm/Kconfig                 |   3 -
>   hw/audio/marvell_88w8618.c     | 315 --------------------------
>   hw/audio/meson.build           |   1 -
>   hw/net/meson.build             |   1 -
>   hw/net/mv88w8618_eth.c         | 403 ---------------------------------
>   include/hw/net/mv88w8618_eth.h |  13 --
>   6 files changed, 736 deletions(-)
>   delete mode 100644 hw/audio/marvell_88w8618.c
>   delete mode 100644 hw/net/mv88w8618_eth.c
>   delete mode 100644 include/hw/net/mv88w8618_eth.h


> -static void mv88w8618_audio_callback(void *opaque, int free_out, int free_in)
> -{
> -    mv88w8618_audio_state *s = opaque;
> -    int16_t *codec_buffer;
> -    QEMU_UNINITIALIZED int8_t buf[4096];
> -    int8_t *mem_buffer;
> -    int pos, block_size;
> -
> -    if (!(s->playback_mode & MP_AUDIO_PLAYBACK_EN)) {
> -        return;
> -    }
> -    if (s->playback_mode & MP_AUDIO_16BIT_SAMPLE) {
> -        free_out <<= 1;
> -    }
> -    if (!(s->playback_mode & MP_AUDIO_MONO)) {
> -        free_out <<= 1;
> -    }
> -    block_size = s->threshold / 2;
> -    if (free_out - s->last_free < block_size) {
> -        return;
> -    }
> -    if (block_size > 4096) {
> -        return;
> -    }
> -    physical_memory_read(s->target_buffer + s->play_pos, buf, block_size);
> -    mem_buffer = buf;
> -    if (s->playback_mode & MP_AUDIO_16BIT_SAMPLE) {
> -        if (s->playback_mode & MP_AUDIO_MONO) {
> -            codec_buffer = wm8750_dac_buffer(s->wm, block_size >> 1);
> -            for (pos = 0; pos < block_size; pos += 2) {
> -                *codec_buffer++ = *(int16_t *)mem_buffer;
> -                *codec_buffer++ = *(int16_t *)mem_buffer;

There seems to be an endianness bug here.

> -                mem_buffer += 2;
> -            }
> -        } else {
> -            memcpy(wm8750_dac_buffer(s->wm, block_size >> 2),
> -                   (uint32_t *)mem_buffer, block_size);
> -        }
> -    } else {
> -        if (s->playback_mode & MP_AUDIO_MONO) {
> -            codec_buffer = wm8750_dac_buffer(s->wm, block_size);
> -            for (pos = 0; pos < block_size; pos++) {
> -                *codec_buffer++ = cpu_to_le16(256 * *mem_buffer);
> -                *codec_buffer++ = cpu_to_le16(256 * *mem_buffer++);
> -            }
> -        } else {
> -            codec_buffer = wm8750_dac_buffer(s->wm, block_size >> 1);
> -            for (pos = 0; pos < block_size; pos += 2) {
> -                *codec_buffer++ = cpu_to_le16(256 * *mem_buffer++);
> -                *codec_buffer++ = cpu_to_le16(256 * *mem_buffer++);
> -            }
> -        }
> -    }
> -    wm8750_dac_commit(s->wm);
> -
> -    s->last_free = free_out - block_size;
> -
> -    if (s->play_pos == 0) {
> -        s->status |= MP_AUDIO_TX_HALF;
> -        s->play_pos = block_size;
> -    } else {
> -        s->status |= MP_AUDIO_TX_FULL;
> -        s->play_pos = 0;
> -    }
> -
> -    if (s->status & s->irq_enable) {
> -        qemu_irq_raise(s->irq);
> -    }
> -}
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>



  parent reply	other threads:[~2026-08-20 10:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 18:54 [PATCH 0/5] arm: Remove the 'musicpal' machine Peter Maydell
2026-08-19 18:54 ` [PATCH 1/5] tests/qtest/pflash-cfi02-test: Don't use musicpal machine for testing Peter Maydell
2026-08-20 11:13   ` Philippe Mathieu-Daudé
2026-08-19 18:54 ` [PATCH 2/5] hw/arm: Remove spurious WM8750 dependency from Realview Kconfig Peter Maydell
2026-08-19 19:37   ` Richard Henderson
2026-08-20 10:55   ` Philippe Mathieu-Daudé
2026-08-21  8:32     ` Peter Maydell
2026-08-19 18:54 ` [PATCH 3/5] hw/arm: Remove the 'musicpal' machine Peter Maydell
2026-08-19 19:35   ` Richard Henderson
2026-08-20 10:55   ` Philippe Mathieu-Daudé
2026-08-19 18:54 ` [PATCH 4/5] hw: Remove Marvell 88W8618 devices Peter Maydell
2026-08-19 19:35   ` Richard Henderson
2026-08-20 10:59   ` Philippe Mathieu-Daudé [this message]
2026-08-21  8:37     ` Peter Maydell
2026-08-19 18:54 ` [PATCH 5/5] hw/audio: Remove wm8750 I2C audio device Peter Maydell
2026-08-19 19:36   ` Richard Henderson
2026-08-20 11:15   ` Philippe Mathieu-Daudé
2026-08-20 10:13 ` [PATCH 0/5] arm: Remove the 'musicpal' machine Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a3faf4b-2b03-48ce-aa85-0406e0ec4b67@oss.qualcomm.com \
    --to=philmd@oss.qualcomm.com \
    --cc=jan.kiszka@web.de \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@mailo.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.