mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: Peter Rosin <peda@axentia.se>,
	alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: pcm: allow changing the playback/capture rates for symmetric links
Date: Thu, 28 Apr 2016 13:03:22 +0200	[thread overview]
Message-ID: <s5h8tzyuhad.wl-tiwai@suse.de> (raw)
In-Reply-To: <20160428103822.GJ3217@sirena.org.uk>

On Thu, 28 Apr 2016 12:38:22 +0200,
Mark Brown wrote:
> 
> 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.

True, but looking at the code there, I wonder how only OSS hits.
Does ALSA-native API really work as is...?


> > >>     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.

There are a couple of ways.  A simple one is with alsa-oss LD_PRELOAD
wrapper, and another is via CUSE.  Also, PA has own LD_PRELOAD
wrapper.


Takashi

  reply	other threads:[~2016-04-28 11:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27  8:49 Peter Rosin
2016-04-27 16:15 ` Mark Brown
2016-04-27 20:45   ` Peter Rosin
2016-04-28 10:38     ` Mark Brown
2016-04-28 11:03       ` Takashi Iwai [this message]
2016-04-28 11:10         ` Mark Brown
2016-04-28 11:26           ` Takashi Iwai
2016-04-28 11:41             ` Mark Brown
2016-04-28 12:02               ` Takashi Iwai
2016-04-28 17:13                 ` Mark Brown
2016-05-02  7:43       ` Peter Rosin
2016-05-04 16:49         ` Mark Brown
2016-05-09 12:17           ` [alsa-devel] " Takashi Iwai

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=s5h8tzyuhad.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=perex@perex.cz \
    /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

all inboxes | Powered by JetHome®