From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Ujfalusi Subject: [PATCH 0/1] ASoC: TWL4030: Constraint setting rework Date: Fri, 17 Apr 2009 15:55:07 +0300 Message-ID: <1239972908-4158-1-git-send-email-peter.ujfalusi@nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mgw-mx09.nokia.com (smtp.nokia.com [192.100.105.134]) by alsa0.perex.cz (Postfix) with ESMTP id 764DE1039C8 for ; Fri, 17 Apr 2009 14:55:48 +0200 (CEST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: alsa-devel@alsa-project.org Cc: sakoman@gmail.com, broonie@opensource.wolfsonmicro.com List-Id: alsa-devel@alsa-project.org Hello, The current implementation of constraints in TWL4030 codec needs some tuning. An interesting case can be generated by using gstreamer: gst-launch-0.10 alsasrc device=hw:0 ! alsasink device=hw:0 sync=false What would (since the current implementation blocks it) happen in this case is: playback stream: open capture stream: open capture stream: hw_params playback_stream: hw_params In capture open we set the constraints to the capture stream based on the playback streams runtime parameters, and they are 0 (rate = 0, sample_bits = 0), since the hw_param has not been called for that stream yet... The following patch fixes this issue among other possible scenarios regarding to constraint handling. Note that I'm not using the just introduced symmetric_rates feature of ASoC introduced by Mark Brown recently, since I think that also suffers from this problem (or not, I have to try it out first to be sure about it) --- Peter Ujfalusi (1): ASoC: TWL4030: Fix for the constraint handling sound/soc/codecs/twl4030.c | 85 ++++++++++++++++++++++++++++++++++---------- 1 files changed, 66 insertions(+), 19 deletions(-)