[alsa-devel] [PATCH] ASoC: pcm: allow changing the playback/capture rates for symmetric links

Mark Brown broonie at kernel.org
Thu Apr 28 12:38:22 CEST 2016


On Wed, Apr 27, 2016 at 10:45:48PM +0200, Peter Rosin wrote:
> On 2016-04-27 18:15, Mark Brown wrote:

> > You've not articulated the problem you're trying to fix here, what in
> > concrete terms is the program trying to accomplish and why should it
> > succeed?

> It is opening an OSS fd, and setting some parameters, but changing
> the speed fails (in this case, since the codec dai has .symmetric_rates).
> As far as I know this is how you specify a specific speed when using
> OSS and it is simply not possibly when one of the involved dais is
> symmetric in any way. Which is silly since there is only one stream,
> so symmetry should not be an issue.

Lots of things just don't work with OSS, we stopped caring about it
years ago.  The configuration mechanism just doesn't play nicely with
dynamic constraints at all.

> >>     if ((fd = open("/dev/dsp", O_WRONLY, 0)) == -1) {
> >>             perror("open");
> >>             return 1;
> >>     }

> > This is using the OSS interfaces which really haven't ever been
> > especially supported for ASoC.

> Apparently, how should I know?

OSS in general had been deprecated for 5-10 years.

> I haven't looked really closely at the userspace side of this, but the
> big picture is that we're using a (closed source) library that in its
> documentation has an example where they open /dev/dsp like this and
> feeds the fd to the lib. We are simply replicating that in our code.
> I don't know if the library does anything OSSy with the fd, or if it
> would be equally happy with an ALSA fd.

If it's using OSS it's unlikely to work with ALSA, the two ABIs are
completely different.  You need to talk to your proprietary software
vendor about updating their software.  There are also some userspace
utilities that try to do the remapping by wrapping things there but I
can't remember the names off the top of my head, it's been a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20160428/368276e3/attachment.sig>


More information about the Alsa-devel mailing list