Capabilities structure

I don’t understand meaning and relation to driver code of some fields in
the capabilities structure.

What does ‘max_voices’ mean? Why it is set to 2 by template driver? ALSA
seems to have something similar in their structure, also set to 2. How
do I pick the right number?

Then there is ‘min fragment size’ and ‘max fragment size’, set to 64 and
128*1024 by template. Why those values? How do I figure right number?
ALSA has more fields there but none of them are called ‘fragment size’.
They have ‘period_bytes_max’, ‘period_bytes_min’, ‘periods_min’ and
‘periods_max’. I feel they mean the same thing but how exactly I’d
calculate ‘fragment_min/max’ from those and how those numbers are
related to code?

The max_dma size is 0 (unlimited) in template. ALSA has ‘buffex_max’
field, does it mean the same thing? They do limit it to 64K (in Maestro
driver) so how do I know if I should limit max_dma?

Those are probably dumb questions for audio driver gurus, but I’m not
one :wink: I could guess some answers but would be nice to hear someone who
knows for sure …

Thanks,

  • Igor

Hi Igor,

2 is the maximum number of voices that are supported for a single
audio data stream. ie. mono or stereo.

Hope this helps.

E.


Igor Kovalenko <Igor.Kovalenko@motorola.com> wrote:

I don’t understand meaning and relation to driver code of some fields in
the capabilities structure.

What does ‘max_voices’ mean? Why it is set to 2 by template driver? ALSA
seems to have something similar in their structure, also set to 2. How
do I pick the right number?

Then there is ‘min fragment size’ and ‘max fragment size’, set to 64 and
128*1024 by template. Why those values? How do I figure right number?
ALSA has more fields there but none of them are called ‘fragment size’.
They have ‘period_bytes_max’, ‘period_bytes_min’, ‘periods_min’ and
‘periods_max’. I feel they mean the same thing but how exactly I’d
calculate ‘fragment_min/max’ from those and how those numbers are
related to code?

The max_dma size is 0 (unlimited) in template. ALSA has ‘buffex_max’
field, does it mean the same thing? They do limit it to 64K (in Maestro
driver) so how do I know if I should limit max_dma?

Those are probably dumb questions for audio driver gurus, but I’m not
one > :wink: > I could guess some answers but would be nice to hear someone who
knows for sure …

Thanks,

  • Igor

How would 4-channel audio work? I mean there are many cards with front
and rear speakers …

Hardware Support Account wrote:

Hi Igor,

2 is the maximum number of voices that are supported for a single
audio data stream. ie. mono or stereo.

Hope this helps.

E.

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
I don’t understand meaning and relation to driver code of some fields in
the capabilities structure.

What does ‘max_voices’ mean? Why it is set to 2 by template driver? ALSA
seems to have something similar in their structure, also set to 2. How
do I pick the right number?

Then there is ‘min fragment size’ and ‘max fragment size’, set to 64 and
128*1024 by template. Why those values? How do I figure right number?
ALSA has more fields there but none of them are called ‘fragment size’.
They have ‘period_bytes_max’, ‘period_bytes_min’, ‘periods_min’ and
‘periods_max’. I feel they mean the same thing but how exactly I’d
calculate ‘fragment_min/max’ from those and how those numbers are
related to code?

The max_dma size is 0 (unlimited) in template. ALSA has ‘buffex_max’
field, does it mean the same thing? They do limit it to 64K (in Maestro
driver) so how do I know if I should limit max_dma?

Those are probably dumb questions for audio driver gurus, but I’m not
one > :wink: > I could guess some answers but would be nice to hear someone who
knows for sure …

Thanks,

  • Igor

Igor Kovalenko wrote:

How would 4-channel audio work? I mean there are many cards with front
and rear speakers …

And SBLive has a 5.1 configuration, and no doubt their next incarnation does,
too…
Would that be two dual streams and two singles, maybe?

Phil Olynyk

Hardware Support Account wrote:

Hi Igor,

2 is the maximum number of voices that are supported for a single
audio data stream. ie. mono or stereo.

Hope this helps.

E.

Igor Kovalenko <> Igor.Kovalenko@motorola.com> > wrote:
I don’t understand meaning and relation to driver code of some fields in
the capabilities structure.

What does ‘max_voices’ mean? Why it is set to 2 by template driver? ALSA
seems to have something similar in their structure, also set to 2. How
do I pick the right number?

Then there is ‘min fragment size’ and ‘max fragment size’, set to 64 and
128*1024 by template. Why those values? How do I figure right number?
ALSA has more fields there but none of them are called ‘fragment size’.
They have ‘period_bytes_max’, ‘period_bytes_min’, ‘periods_min’ and
‘periods_max’. I feel they mean the same thing but how exactly I’d
calculate ‘fragment_min/max’ from those and how those numbers are
related to code?

The max_dma size is 0 (unlimited) in template. ALSA has ‘buffex_max’
field, does it mean the same thing? They do limit it to 64K (in Maestro
driver) so how do I know if I should limit max_dma?

Those are probably dumb questions for audio driver gurus, but I’m not
one > :wink: > I could guess some answers but would be nice to hear someone who
knows for sure …

Thanks,

  • Igor