Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2727591imm; Tue, 4 Sep 2018 09:04:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbUvqg0+OVRyiXuhXa/I0UgD0Z1PXANG8PbzJOg7IX0NXwTW8tGtXh+r7vXd6IqwLX4H8wu X-Received: by 2002:a17:902:d808:: with SMTP id a8-v6mr34231299plz.68.1536077049997; Tue, 04 Sep 2018 09:04:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536077049; cv=none; d=google.com; s=arc-20160816; b=rJWN/3W/IVGrOzfov2gL6dwIrK8Flybd2962DsqT1l7oNwvHn/CvCsVY/gAU7S5+Wq yZfQRFGu1qoDL85byqkuuB1GhbGeLfyiIwl71jcDIJnUEMfueSSBQU4S2pv9qI6gzF0i LgmdHctobNG+Lmvzgr6D+jh0dkqb+DJAI6kqMtx8IYJgWxe5mz/1tTyhqnp8YCe9kIfa 2bMUEe3jT1tJHO1FoseamYcepABJLpN8qogsHdvlcYMVrkpULh9a7b1P5Ej7BXf82o2f E8w4lpW+onLMmeerpdBhDxOFoGOdysBdBC9U0g3oe2oVHoLlu+uWFjBV/f85q2+WTbuF cDww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=6UZ1GmPf+N+CxiIpRRXMCXLhGEmfC8qqXSih4J9hP/s=; b=ygePvmQufwwLhkXIv3vCCbCKb17s4Hn+rUf/6W8IVH2haEc+qWDmCC/Hoc1+VIwMbB vn3jOLGUffkVVRybsxYLjWVB8rXIlAjWEm84X6Kri+k/e36d1DYa/qc3aZPTeEgcTbuR JNWz36+vpWHiG1j4GpFe0s95Zbag8sWMXYdHlSgnuvyGTQPqAQxZ09eTPHvrA6J66HGO Bj5qocpfXmvw3xk0WN9/QeUelIIzCZr9Op4v3xU4vVkUsWkbvS3j/qisIqFU//n5M7MS RC75i7nLc6tQptoaPhA6FQaKOfafE10oZADCS2qvhGrOZoHGxfhToUALpeFu3+g0YavY R/HA== 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 j1-v6si21226795pfh.63.2018.09.04.09.03.46; Tue, 04 Sep 2018 09:04:09 -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 S1728108AbeIDU0G (ORCPT + 99 others); Tue, 4 Sep 2018 16:26:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:50976 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727769AbeIDUYu (ORCPT ); Tue, 4 Sep 2018 16:24:50 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 68879B0AC; Tue, 4 Sep 2018 15:59:02 +0000 (UTC) From: Takashi Iwai To: Greg Kroah-Hartman Cc: Eric Anholt , Stefan Wahren , linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/29] staging: bcm2835-audio: Add 10ms period constraint Date: Tue, 4 Sep 2018 17:58:46 +0200 Message-Id: <20180904155858.8001-18-tiwai@suse.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180904155858.8001-1-tiwai@suse.de> References: <20180904155858.8001-1-tiwai@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It seems that the resolution of vc04 callback is in 10 msec; i.e. the minimal period size is also 10 msec. This patch adds the corresponding hw constraint. Signed-off-by: Takashi Iwai --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c index 9659c25b9f9d..6d89db6e14e4 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c @@ -145,6 +145,11 @@ static int snd_bcm2835_playback_open_generic( SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 16); + /* position update is in 10ms order */ + snd_pcm_hw_constraint_minmax(runtime, + SNDRV_PCM_HW_PARAM_PERIOD_TIME, + 10 * 1000, UINT_MAX); + chip->alsa_stream[idx] = alsa_stream; chip->opened |= (1 << idx); -- 2.18.0