[Bug 753601] alsa: Probe a fixed set of rates instead of a range

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue May 3 07:57:25 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=753601

--- Comment #12 from Carlos Rafael Giani <dv at pseudoterminal.org> ---
(In reply to Tim-Philipp Müller from comment #11)
> My suggestion would be to try a few 'unusual' sample rates within the
> advertised range, and if the device is okay with them we assume that it's
> probably okay with anything, and if it's not okay with those it's probably
> not okay with other unusual rates either. What do you think?
> 
> I'm sure I've seen such code somewhere, maybe in another audio sink.

The problem is: what is the "unusual rate"? 48001 Hz? 44000 Hz? Etc. It seems
fairly arbitrary. And I have seen hardware where the crystal was chosen badly,
so you got something like a 46.02 kHz sample rate etc.

Also, if you detect that this unusual rate isn't supported ... what then? You
test a hardcoded set of sample rates? If so, shouldn't this set be
configurable?

If we stick with the "unusual rate" idea, then I think this one should be
configurable too.

Or, we simply do a brute-force probing of ALL sample rates between the min and
max rates. If this doesn't consume a lot of resources, it is probably the
easiest option. When I get the chance, I'll try it on a single-core TI
platform.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list