qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Randrianasulu <randrianasulu@gmail.com>
To: Thomas Huth <thuth@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>, QEMU <qemu-devel@nongnu.org>
Subject: Re: ALSA support in qemu-user?
Date: Tue, 15 Oct 2024 17:06:32 +0300	[thread overview]
Message-ID: <CA+rFky61Xc1=J5XWbL2bNeSExErF=PHyzCn4XZ_O12uuA668RA@mail.gmail.com> (raw)
In-Reply-To: <CA+rFky7AOmikj40fR8ivC5s2aFT+tnKoVJ5fPRkm7i490FOwzw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2999 bytes --]

пн, 14 окт. 2024 г., 17:26 Andrew Randrianasulu <randrianasulu@gmail.com>:

>
>
> On Mon, Oct 14, 2024 at 12:21 PM Thomas Huth <thuth@redhat.com> wrote:
>
>> On 14/10/2024 11.06, Peter Maydell wrote:
>> > On Mon, 14 Oct 2024 at 02:13, Andrew Randrianasulu
>> > <randrianasulu@gmail.com> wrote:
>> >>
>> >> some 8 years ago this patch was sent  to qemu-devel:
>> >>
>> >> https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg05333.html
>> >> "[Qemu-devel] [PATCH 7/7] Add ALSA ioctls"
>> >>
>> >> I wonder why it was rejected, may be as part of series?
>> >
>> > Hard to say from this distance, but looking at the patch
>> > I think it probably was just that it was on the end of
>> > a series that did a bunch of other things and the earlier
>> > patches in the series had issues.
>>
>> Yes, looks like there were review comments on the series that were not
>> addressed:
>>
>>   https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg05557.html
>>   https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg05364.html
>>
>> But mainly one of the problems were that the patches haven't been send in
>> a
>> proper threaded way, so it was hard to follow the series:
>>
>>   https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg05546.html
>>
>> Anyway, looking at the other patches, it seems most of them were not
>> related
>> to ALSA, so you might be fine in just picking that patch, get it to work
>> with the latest version of QEMU again and send just that single updated
>> patch to this mailing list again. YMMV of course.
>>
>
> I tried  to apply patch but unfortunately mplayer still complain:
>
> [AO_ALSA] alsa-lib: pcm_hw.c:1578:(snd1_pcm_hw_open_fd) USER_PVERSION
> failed
>
> [AO_ALSA] alsa-lib: pcm_dmix.c:1092:(snd_pcm_dmix_open) unable to open
> slave
> [AO_ALSA] Playback open error: Inappropriate ioctl for device
>
> this is 32-bit mplayer/qemu-i386 on top of 64-bit kernel (x86_64)
>
> qemu git 3860a2a8de56fad71db42f4ad120eb7eff03b51f
>
> ./configure --prefix=/usr --target-list=i386-linux-user
>
>
so, may be qemu internal changed a bit, I tried to add MK_PTR around
int/long types in ioctl.h like it was done for alsa timer ctl before

but what to do with unsingned long in syscall_defs.h ?

there is abi_int so I changed simple  int to that.

Anyway with attached patch it still fails to play, while arecord -L /aplay
-L show their lists

normal speaker-test run:

strace -e ioctl /usr/bin/speaker-test 2>&1 | grep PVERSION
 ioctl(3, SNDRV_CTL_IOCTL_PVERSION, 0xff8bd008) = 0

   ioctl(4, AGPIOC_INFO or SNDRV_PCM_IOCTL_PVERSION, 0xff8bcefc) = 0

 ioctl(4, AGPIOC_RESERVE or SNDRV_PCM_IOCTL_USER_PVERSION, 0xff8bcf08) = 0

failed run with qemu-i386:

strace -e ioctl qemu-i386 /usr/bin/speaker-test 2>&1 | grep PVERSION
 ioctl(3, SNDRV_CTL_IOCTL_PVERSION, 0xff8410ac) = 0

 ioctl(4, AGPIOC_INFO or SNDRV_PCM_IOCTL_PVERSION, 0xff8410ac) = 0



>
>
>>
>>   Thomas
>>
>>

[-- Attachment #1.2: Type: text/html, Size: 5795 bytes --]

[-- Attachment #2: 0002-linux-user-trying-yo-fix-alsa-ioctls-not-working-yet.patch --]
[-- Type: application/x-patch, Size: 10792 bytes --]

  reply	other threads:[~2024-10-15 14:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14  1:18 ALSA support in qemu-user? Andrew Randrianasulu
2024-10-14  9:06 ` Peter Maydell
2024-10-14  9:21   ` Thomas Huth
2024-10-14 14:26     ` Andrew Randrianasulu
2024-10-15 14:06       ` Andrew Randrianasulu [this message]
2024-10-15 21:50         ` Andrew Randrianasulu

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='CA+rFky61Xc1=J5XWbL2bNeSExErF=PHyzCn4XZ_O12uuA668RA@mail.gmail.com' \
    --to=randrianasulu@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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 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).