From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285AbcD1Kio (ORCPT ); Thu, 28 Apr 2016 06:38:44 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:53018 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752207AbcD1Kil (ORCPT ); Thu, 28 Apr 2016 06:38:41 -0400 Date: Thu, 28 Apr 2016 11:38:22 +0100 From: Mark Brown To: Peter Rosin Cc: alsa-devel@alsa-project.org, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org Message-ID: <20160428103822.GJ3217@sirena.org.uk> References: <1461746959-11443-1-git-send-email-peda@axentia.se> <20160427161504.GZ3217@sirena.org.uk> <122ca84a-230e-654e-425f-3adb0ca00ec7@axentia.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hQZD+IfmO+MFVaX7" Content-Disposition: inline In-Reply-To: <122ca84a-230e-654e-425f-3adb0ca00ec7@axentia.se> X-Cookie: Tomorrow, you can be anywhere. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] ASoC: pcm: allow changing the playback/capture rates for symmetric links X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --hQZD+IfmO+MFVaX7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --hQZD+IfmO+MFVaX7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXIegdAAoJECTWi3JdVIfQVkYH/RegIvmnjSK301pvZzNev4Nl UVvmdMYkJ32tdidkVCw0Ghl1EbNPiNs6eS8VqQs0/6sZ2A4G8AJaFBGvqsETiXAH eQZBkJjz4pnJRJIB03G5rKK53loCurKPreb0CWk3170rTCd4Ulid1KX91KbEoHnt QwK9oJasVK4exKgOdKVdu90SD/YeyEVyBiSr/HLZfp+HItGaeqRQxm4wJwJWcu0Y AKtOma8BY1w0onlm+vykWgGqzFYWrRmbiorc1bwAtURQ7lP7AFrO4d3kRR6sspnI qu4RziawnOl2eto73tXYN8ExFeKM2xPh1b5Y3AhOhyHWvFzObeeCvlm7rLnRZow= =QnlW -----END PGP SIGNATURE----- --hQZD+IfmO+MFVaX7--