From: David Vrabel <david.vrabel@citrix.com>
To: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Cc: lars.kurth@citrix.com, iurii.konovalenko@globallogic.com,
xen-devel@lists.xensource.com, "Andrushchenko,
Oleksandr" <andr2000@gmail.com>,
ian.jackson@eu.citrix.com, oleksandr.dmytryshyn@globallogic.com,
tim@xen.org, Andrii Anisov <andrii.anisov@gmail.com>,
olekstysh@gmail.com, embedded-pv-devel@lists.xenproject.org,
al1img@gmail.com, jbeulich@suse.com, dario.faggioli@citrix.com,
Artem Mygaiev <joculator@gmail.com>
Subject: Re: [PATCH v8] This is ABI for the two halves of a Para-virtual sound driver to communicate with each to other.
Date: Wed, 16 Nov 2016 13:31:39 +0000 [thread overview]
Message-ID: <c75b0266-f9dd-fc69-4dbe-68daf0c8f5d1@citrix.com> (raw)
In-Reply-To: <CAOcqxo1meR_0c00bYVKdLbV2NdYgqi_gwXiDVoXpEztUStLopA@mail.gmail.com>
On 16/11/16 13:12, Volodymyr Babchuk wrote:
> Hello David,
>
> I helped Oleksandr with parts of this protocol, so I want to address
> some questions you asked.
>
> On 16 November 2016 at 12:38, David Vrabel <david.vrabel@citrix.com> wrote:
>>
>> Sound is not my area of expertise but I have a few points that you may
>> like to consider.
>>
>> 1. You can only say how many channels a stream has, not what the
>> channels correspond to (e.g., "left", "right" for a 2 channel stereo
>> stream; or "left-front", "rear-right", etc. for a 6 channel 5.1 surround
>> sound stream).
>>
> Yes, we can specify mapping. But problem that is no one expects this
> information.
> There are predefined orders like left-right or FR-FL-RR-RL-FC-LFE on
> chosen platform and all audio software just know and use them.
Specifying a fixed ordering of channels is fine.
> But now I'm thinking that it is a good idea to add predefined orders
> to the protocol.
> If target platform have a different order (e.g. backend running on
> Windows), than backend should reorder data.
>
>> 2. Volume control uses absolute power levels (dBm). How is this supposed
>> to map to the standard 0-100% volume controls that are most commonly
>> presented to a user?
> Aaaah, volumes. They are problematic. Different hardware use different
> scales. They can be linear, logarithmic, they can have different
> ranges, there can be integrated amplifiers, etc, etc. But good news
> that audio subsystem always know how to remap those scales into dBm
> scale. On this scale 0dBm is 100% and -inf dBm is 0%. If actual sound
> hardware have internal gain, it will support volume above 0dBm (or
> above 100%) and also will add distortion to sound, btw. There are
> special formula that maps dBms to percens. This formula is non-linear.
> Also, different sound systems can use different formulas. So it is
> better not to stick to percents, because percents on Linux and on
> Windows running on the same hardware will be different percents. Even
> percents reported by ALSA and reported by PulseAudio are different.
> We can't represent -inf as integer, but this is not needed, thanks to
> logarithmic nature of dBm. Any sufficiently small value like -120dBm
> will do the job and smallest possible value of -2147483,648dBm will be
> indistinguishable from silence on any present or future hardware.
This all sounds fine to me except you've got the units wrong and you
really mean dB (not dBm where 0 dBm == 1 mW of output power which
doesn't make a whole lot of sense in this context).
>> 6. PCM_FORMAT_SPECIAL doesn't seem useful to me. New formats should be
>> added via an update to this spec.
> You can consider PCM_FORMAT_SPECIAL as raw format. I.e. "I know how to
> prepare data for my device and my device expects audio in that
> format". You don't need this on generic x86 system,
> but it can be absolutely crucial on embedded system with hardware
> accelerated audio/video playback for example.
The frontend doesn't know what the underlying hardware is so how can it
know what format SPECIAL means?
Perhaps you could give an example of what one of these "special" formats
looks like?
I think it would be better to define a format number/name for each
special format.
David
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-11-16 13:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 20:51 [PATCH v8] sndif: add ABI for Para-virtual sound Andrushchenko, Oleksandr
2016-11-04 20:51 ` [PATCH v8] This is ABI for the two halves of a Para-virtual sound driver to communicate with each to other Andrushchenko, Oleksandr
2016-11-11 21:24 ` Konrad Rzeszutek Wilk
2016-11-12 9:57 ` Oleksandr Andrushchenko
2016-11-14 10:39 ` Jan Beulich
2016-11-15 19:18 ` Konrad Rzeszutek Wilk
2016-11-16 6:51 ` Oleksandr Andrushchenko
2016-11-16 10:38 ` David Vrabel
2016-11-16 13:12 ` Volodymyr Babchuk
2016-11-16 13:31 ` David Vrabel [this message]
2016-11-16 13:53 ` Volodymyr Babchuk
2016-11-18 7:34 ` Oleksandr Andrushchenko
2016-11-08 13:11 ` [Embedded-pv-devel] [PATCH v8] sndif: add ABI for Para-virtual sound Lars Kurth
2016-11-08 13:27 ` Oleksandr Andrushchenko
2016-11-08 14:04 ` Lars Kurth
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=c75b0266-f9dd-fc69-4dbe-68daf0c8f5d1@citrix.com \
--to=david.vrabel@citrix.com \
--cc=al1img@gmail.com \
--cc=andr2000@gmail.com \
--cc=andrii.anisov@gmail.com \
--cc=dario.faggioli@citrix.com \
--cc=embedded-pv-devel@lists.xenproject.org \
--cc=ian.jackson@eu.citrix.com \
--cc=iurii.konovalenko@globallogic.com \
--cc=jbeulich@suse.com \
--cc=joculator@gmail.com \
--cc=lars.kurth@citrix.com \
--cc=oleksandr.dmytryshyn@globallogic.com \
--cc=olekstysh@gmail.com \
--cc=tim@xen.org \
--cc=vlad.babchuk@gmail.com \
--cc=xen-devel@lists.xensource.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).