Re: [LAD] JACK on Gigaport HD+ at 4800kHz (reduced channel count)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Fons Adriaensen <fons@...>
Cc: linux-audio-dev@lists.linuxaudio.org <linux-audio-dev@...>
Date: Tuesday, February 25, 2014 - 12:54 am

--001a1134d69cf8c5c804f330859e
Content-Type: text/plain; charset=ISO-8859-1

On Mon, Feb 24, 2014 at 6:19 PM, Fons Adriaensen wrote:

>

No, this is based on a misconception.

The legal ALSA driver parameters form a sparse multi-dimensional space. The
driver knows the legal intervals along each dimensional axis, but it does
not know the shape of the intersecting space.

Thus the only way to find out if a given combination of parameters is legal
is to try to set them and see if the hardware accepts them.

I only know the RME Hammerfall driver well, but in that case, where the
channel count changes depending on whether you do <88.2kHz or >= 88.2kHz,
there is no way that the driver can tell you that your attempt to use too
many channels is wrong until you submit the entire h/w params struct.

>

No. The driver just gives you some values based on a possible (or maybe
even most likely) scenario. The driver does not know the number of channels
in a definitive way. This is partly an ALSA API issue and partly a h/w
issue - in some cases, you just don't know (or it is very fiddly and
complex to find out - e.g. is there a daughterboard present that increases
the channel count in some cases).

--001a1134d69cf8c5c804f330859e
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 24, 2014 at 6:19 PM, Fons Adriaensen =
<fons@linuxaudi=
o.org
> wrote:

The problem I guess is due to the way the HW related params
are set:

1. =A0Allocate a hw_params struct
2. =A0Fill in the params using set_*** functions
3. =A0Submit the hw_params struct.

In step 2, the set_*** functions are aware of the acceptable
ranges/values and will report error if anything is not possible.
The backend code sets the sample rate before anything related
to channel counts is set or tested. So if the ALSA code still
reports that 8 channels are available after the sample rate
is set to 48 kHz, that looks to me like a bug in the driver.No, this is based on a misconception.The lega=
l ALSA driver parameters form a sparse multi-dimensional space. The driver =
knows the legal intervals along each dimensional axis, but it does not know=
the shape of the intersecting space.
Thus the only way to find out if a given combination of para=
meters is legal is to try to set them and see if the hardware accepts them.=
I only know the RME Hammerfall driver well, but in that =
case, where the channel count changes depending on whether you do <88.2k=
Hz or >=3D 88.2kHz, there is no way that the driver can tell you that yo=
ur attempt to use too many channels is wrong until you submit the entire h/=
w params struct.
=A0

The HW itself is not set up before step 3, so it is probably
still set to 44.1 kHz while the hw_params is filled in, and it
reports 8 channels.No. The driver just=
gives you some values based on a possible (or maybe even most likely) scen=
ario. The driver does not know the number of channels in a definitive way. =
This is partly an ALSA API issue and partly a h/w issue - in some cases, yo=
u just don't know (or it is very fiddly and complex to find out - e.g. =
is there a daughterboard present that increases the channel count in some c=
ases).
=A0

--001a1134d69cf8c5c804f330859e--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] JACK on Gigaport HD+ at 4800kHz (reduced channel count), Jörn Nettingsmeier, (Mon Feb 24, 10:35 pm)
Re: [LAD] JACK on Gigaport HD+ at 4800kHz (reduced channel c..., Jörn Nettingsmeier, (Tue Feb 25, 10:08 pm)
Re: [LAD] JACK on Gigaport HD+ at 4800kHz (reduced channel c..., Paul Davis, (Tue Feb 25, 12:54 am)
Re: [LAD] JACK on Gigaport HD+ at 4800kHz (reduced channel c..., Jörn Nettingsmeier, (Tue Feb 25, 1:25 pm)