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

2016-05-09 Thread Takashi Iwai
On Wed, 04 May 2016 18:49:22 +0200, Mark Brown wrote: > > On Mon, May 02, 2016 at 09:43:53AM +0200, Peter Rosin wrote: > > > The problem is in the drain/close part. If I leave out snd_pcm_drain > > I naturally lose the tail of the output, but if I have it I get what > > I guess is a repeat of the

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

2016-05-04 Thread Mark Brown
On Mon, May 02, 2016 at 09:43:53AM +0200, Peter Rosin wrote: > The problem is in the drain/close part. If I leave out snd_pcm_drain > I naturally lose the tail of the output, but if I have it I get what > I guess is a repeat of the content in some circular buffer. I.e. the > very last part of the

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

2016-05-02 Thread Peter Rosin
On 2016-04-28 12:38, Mark Brown wrote: > On Wed, Apr 27, 2016 at 10:45:48PM +0200, Peter Rosin wrote: >> 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 /d

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

2016-04-28 Thread Mark Brown
On Thu, Apr 28, 2016 at 02:02:21PM +0200, Takashi Iwai wrote: > Mark Brown wrote: > > On Thu, Apr 28, 2016 at 01:26:49PM +0200, Takashi Iwai wrote: > > > BTW, this reminds me of another question: don't we have a dummy ASoC > > > driver like snd-dummy? It would be convenient for a casual API > > >

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

2016-04-28 Thread Takashi Iwai
On Thu, 28 Apr 2016 13:41:50 +0200, Mark Brown wrote: > > On Thu, Apr 28, 2016 at 01:26:49PM +0200, Takashi Iwai wrote: > > Mark Brown wrote: > > > > We've had the code for years without anyone reporting issues so... the > > > idiomatic ALSA thing is to set everything in one call which helps a l

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

2016-04-28 Thread Mark Brown
On Thu, Apr 28, 2016 at 01:26:49PM +0200, Takashi Iwai wrote: > Mark Brown wrote: > > We've had the code for years without anyone reporting issues so... the > > idiomatic ALSA thing is to set everything in one call which helps a lot. > Yes, most of such problems come from the inconsistent hw con

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

2016-04-28 Thread Takashi Iwai
On Thu, 28 Apr 2016 13:10:01 +0200, Mark Brown wrote: > > On Thu, Apr 28, 2016 at 01:03:22PM +0200, Takashi Iwai wrote: > > Mark Brown wrote: > > > > 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 > >

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

2016-04-28 Thread Mark Brown
On Thu, Apr 28, 2016 at 01:03:22PM +0200, Takashi Iwai wrote: > Mark Brown wrote: > > 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

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

2016-04-28 Thread Takashi Iwai
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

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

2016-04-28 Thread Mark Brown
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 sett

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

2016-04-27 Thread Peter Rosin
On 2016-04-27 18:15, Mark Brown wrote: > On Wed, Apr 27, 2016 at 10:49:19AM +0200, Peter Rosin wrote: > >> The below program fails on a dai link with symmetric rates without this >> patch. The patch makes it work. > > You've not articulated the problem you're trying to fix here, what in > concrete

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

2016-04-27 Thread Mark Brown
On Wed, Apr 27, 2016 at 10:49:19AM +0200, Peter Rosin wrote: > The below program fails on a dai link with symmetric rates without this > patch. The patch makes it work. You've not articulated the problem you're trying to fix here, what in concrete terms is the program trying to accomplish and why

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

2016-04-27 Thread Peter Rosin
The below program fails on a dai link with symmetric rates without this patch. The patch makes it work. #include #include #include #include #include int main(void) { int fd; int format; int channels; int speed; if ((fd = open("/dev/dsp", O_WRONLY, 0)) == -1) {