From patchwork Tue Jul 8 14:30:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Utkin X-Patchwork-Id: 4505621 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5F08D9F392 for ; Tue, 8 Jul 2014 14:31:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 975682024C for ; Tue, 8 Jul 2014 14:31:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15EF1201DE for ; Tue, 8 Jul 2014 14:31:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754023AbaGHObU (ORCPT ); Tue, 8 Jul 2014 10:31:20 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:47677 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752253AbaGHOav (ORCPT ); Tue, 8 Jul 2014 10:30:51 -0400 Received: by mail-lb0-f176.google.com with SMTP id w7so4036318lbi.35 for ; Tue, 08 Jul 2014 07:30:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qBYpgDk+QALAwSGG/e7RagYe8vVJu0NS/dYrF7YOXLg=; b=RYDQzh34v1wh9XhIwc3ucrBl36Tl/Gb2GYcEDzU3mVcUee2y7sXzjGgci26QGxgh8Q WdkiJulqN9ig03MuXO+JYcHHehaCvIKPtZrY8o3Lh5JwofZU5DGqWOTP1+d9rOdOoj19 JyQcATuDylzEs11mecArF544hyLALobGtLz+Ce6knwLPY9jXokqHJxXW4P8kykPkofw9 5KtZ9gDlHpsmLSwzs8axys+FRR3FFvKDcNiaCpkjCGtyDNcqIW6SjVz1WbxjxW3xYD2t f6dnm/M9Q8WSGv7w5SShsoe6SFNcFXTsmwquZrwAtcfsnydvc4zMkiGlOuKF6SyacAZm +luQ== X-Gm-Message-State: ALoCoQlclI7TG5EEUQCIHWiLz7v9HPmMs6GYctN6rx3drZ7Dkz8RPRmlRajVjirW/fVnatGrvnB0 X-Received: by 10.112.17.102 with SMTP id n6mr26813866lbd.39.1404829850426; Tue, 08 Jul 2014 07:30:50 -0700 (PDT) Received: from localhost.localdomain (alfa-g11.tenet.odessa.ua. [195.138.73.151]) by mx.google.com with ESMTPSA id ks4sm18431633lac.18.2014.07.08.07.30.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jul 2014 07:30:49 -0700 (PDT) From: Andrey Utkin To: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linux-media@vger.kernel.org Cc: gregkh@linuxfoundation.org, m.chehab@samsung.com, ismael.luceno@corp.bluecherry.net, Andrey Utkin Subject: [PATCH 2/2] solo6x10: update GOP size, QP immediately Date: Tue, 8 Jul 2014 17:30:34 +0300 Message-Id: <1404829834-8747-2-git-send-email-andrey.utkin@corp.bluecherry.net> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1404829834-8747-1-git-send-email-andrey.utkin@corp.bluecherry.net> References: <1404829834-8747-1-git-send-email-andrey.utkin@corp.bluecherry.net> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Previously, it was needed to reopen device to update GOP size and quantization parameter. Now we update device registers with new values immediately. --- drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c index bf6eb06..14f933f 100644 --- a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c @@ -1110,9 +1110,13 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl) ctrl->val); case V4L2_CID_MPEG_VIDEO_GOP_SIZE: solo_enc->gop = ctrl->val; + solo_reg_write(solo_dev, SOLO_VE_CH_GOP(solo_enc->ch), solo_enc->gop); + solo_reg_write(solo_dev, SOLO_VE_CH_GOP_E(solo_enc->ch), solo_enc->gop); return 0; case V4L2_CID_MPEG_VIDEO_H264_MIN_QP: solo_enc->qp = ctrl->val; + solo_reg_write(solo_dev, SOLO_VE_CH_QP(solo_enc->ch), solo_enc->qp); + solo_reg_write(solo_dev, SOLO_VE_CH_QP_E(solo_enc->ch), solo_enc->qp); return 0; case V4L2_CID_MOTION_THRESHOLD: solo_enc->motion_thresh = ctrl->val;