From patchwork Tue Jul 8 15:23:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Utkin X-Patchwork-Id: 4505901 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 B8DC19F39B for ; Tue, 8 Jul 2014 15:24:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EAA0120211 for ; Tue, 8 Jul 2014 15:24:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EB482020F for ; Tue, 8 Jul 2014 15:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754585AbaGHPYp (ORCPT ); Tue, 8 Jul 2014 11:24:45 -0400 Received: from mail-la0-f47.google.com ([209.85.215.47]:61907 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754361AbaGHPX5 (ORCPT ); Tue, 8 Jul 2014 11:23:57 -0400 Received: by mail-la0-f47.google.com with SMTP id s18so4141953lam.34 for ; Tue, 08 Jul 2014 08:23:56 -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=RUYncIPk3HvtADNHtSfCgnnQCY6ptV19zJfqj0/4qAM=; b=J8dYr/Kq5U9QrpaqlU4kkD4Hz0hKpi0+vVi/bNV8FJZ19y7B/07JNF4dQ5pbtTOs8V v3tC4S4t3C0KRVS7lfHytd5yw6XfRuy2cfJXNIVGhFWZyYvr3JZtMcbcaSSEGjt7hzgE NAye7q0PwtvrZ45JkoQ7Gdiu6HO33FRjaU9zvKIFe9OuzZjXJ4jeJxzqvrUAhTIR9UUk 7tzDp9zTdD4LV/7I3qbvqsW8CfaDZrQvgK2+0NBJQBSHwl7Ao/pwLc1httRnXsJQ0oST YoKzdZw4Ze349M+sWMRpdoI2o4gwg0PT3Hsgi3eT629+uTxf9lCXzOW3wMk8lypbNYmw cjmQ== X-Gm-Message-State: ALoCoQk3qZdMWQTxoq5oVyAwTHd5hUcp3L3kNk2vFA5qT5PmTRqU0U3xpUEG+N1zWUhzPBE+MzIK X-Received: by 10.112.202.39 with SMTP id kf7mr27087856lbc.37.1404833036255; Tue, 08 Jul 2014 08:23:56 -0700 (PDT) Received: from localhost.localdomain (alfa-g11.tenet.odessa.ua. [195.138.73.151]) by mx.google.com with ESMTPSA id q3sm20701481lae.23.2014.07.08.08.23.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jul 2014 08:23:55 -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 18:23:33 +0300 Message-Id: <1404833013-18627-2-git-send-email-andrey.utkin@corp.bluecherry.net> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1404833013-18627-1-git-send-email-andrey.utkin@corp.bluecherry.net> References: <1404833013-18627-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. Signed-off-by: Andrey Utkin Signed-off-by: Ismael Luceno --- 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;