Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6723671ybi; Mon, 22 Jul 2019 00:25:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqy43ocmZGNGPY86eDkAA9PuPShkjmAj+bfB0lv7rnwRcUkivR0EQ1mePD2jYsCwoZugg2+w X-Received: by 2002:a17:90a:3590:: with SMTP id r16mr76318165pjb.44.1563780301584; Mon, 22 Jul 2019 00:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563780301; cv=none; d=google.com; s=arc-20160816; b=0+h78kVRvSGoAnraAMfBuviX1rDqT5PlfMnglVvLGS7BTXVATyAlTF9Ap3EGPwBG8/ 0DiM+VdEg5k/FcZuc4WtFCW2Skia0U4Ri0X20C85jRGro/Ukf/ioCdw17qy7PMeGr1sN BISAUUk9eFlnlgkSri+ibTIAjjDIQ/LWccB+KyN12k69gPk5FZ9olcbTKjPicpmpgNXS TsLwHBhYLcgxUGR+7oK4kNCPDRFZvcI8vq6b+R90ckw21BiVk2hPJxmTIlJMn4vAo1O6 DZSr3vGv4YTIcd56zJV8IAqnknwDtmYLEHoNfiadisMd0tfg1ibD0OQtnpmIX6jA4ELy fvyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=J3McfTFeFYJLaUoRrnDMfTB/Q1+vmfXkkCAdEUQWHUQ=; b=i6wmnLBmihJg5W/VuVvjXa5EtiS2t/KFhPSHjkAzTwp9rl/dZQyGpiofr/JLLf/enT ZbbZZ9lcOKHzcWOvSx9nDxa6mxABcpQJnsW3SRen/QMO1YE8z4zVh+kWkUh6Ev/Zmx7C ZVzgk2ASzuxV931AgG+E6Rir3elR1AA0D7vLUYHtuyv9RJpT05s1eHYzyl/D8Q4ZEpNF /NWV4uRS2Yc06qQsILnAhg4RrISKjfwTlbUxr+zswFJ9wTru9XemagfEPqZZ84x2DYQl eHLxE97Qk0SMrgy7VlHygBYUANNCxag4LtNs0e0N0nel4Fjf3vQu995W3OBtQGseXg52 2GRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k133si8276994pgc.425.2019.07.22.00.24.45; Mon, 22 Jul 2019 00:25:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727913AbfGVHYJ (ORCPT + 99 others); Mon, 22 Jul 2019 03:24:09 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:52968 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726944AbfGVHYJ (ORCPT ); Mon, 22 Jul 2019 03:24:09 -0400 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hpSfy-0002G4-5N from Jiada_Wang@mentor.com ; Mon, 22 Jul 2019 00:24:02 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 22 Jul 2019 00:23:58 -0700 From: Jiada Wang To: , , , , CC: , , , Subject: [PATCH v1 0/3] Allow reconfiguration of clock rate Date: Mon, 22 Jul 2019 16:24:00 +0900 Message-ID: <20190722072403.11008-1-jiada_wang@mentor.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: svr-orw-mbx-08.mgc.mentorg.com (147.34.90.208) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is use case in Gstreamer ALSA sink, in case of changed caps Gsreatmer reconfigs and it calls snd_pcm_hw_free() before snd_pcm_prepre(). See gstreamer1.0-plugins-base/ gst-libs/gst/audio/gstaudiobasesink.c: gst_audio_base_sink_setcaps(): - gst_audio_ring_buffer_release() - gst_audio_sink_ring_buffer_release() - gst_alsasink_unprepare() - snd_pcm_hw_free() is called before - gst_audio_ring_buffer_acquire() - gst_audio_sink_ring_buffer_acquire() - gst_alsasink_prepare() - set_hwparams() - snd_pcm_hw_params() - snd_pcm_prepare() But with current implementation after clock rate is started in .prepare reconfiguration of clock rate is not allowed, unless the stream is stopped. This patch set by move stop of clock to .hw_free callback, to allow reconfiguration of clock rate. Jiada Wang (1): ASoC: rsnd: call .hw_{params,free} in pair for same stream Timo Wischer (2): ASoC: rsnd: Support hw_free() callback at DAI level ASoC: rsnd: Allow reconfiguration of clock rate sound/soc/sh/rcar/core.c | 22 +++++++++++++-- sound/soc/sh/rcar/rsnd.h | 36 ++++++++++++++++++++---- sound/soc/sh/rcar/ssi.c | 61 +++++++++++++++++++++++++++++----------- sound/soc/sh/rcar/ssiu.c | 3 +- 4 files changed, 96 insertions(+), 26 deletions(-) -- 2.19.2