From patchwork Sun Mar 10 11:40:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Schaefer X-Patchwork-Id: 17240 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1UEebh-0002NT-WE; Sun, 10 Mar 2013 12:40:02 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-3) with esmtp id 1UEebh-0005CU-Dw; Sun, 10 Mar 2013 12:40:01 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056Ab3CJLj6 (ORCPT + 1 other); Sun, 10 Mar 2013 07:39:58 -0400 Received: from mail-ea0-f175.google.com ([209.85.215.175]:39206 "EHLO mail-ea0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751800Ab3CJLj5 (ORCPT ); Sun, 10 Mar 2013 07:39:57 -0400 Received: by mail-ea0-f175.google.com with SMTP id o10so751245eaj.6 for ; Sun, 10 Mar 2013 04:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=MYqkB9f+RzZxEkSRAUFGWpfN8/whyyVLCTX+1VgLM/s=; b=04zMRI3w5q3wXxNe9EKSRmx574MoYgtHX6YU6IeBQS2iMs2SGsZcghVyM0CtjXQKgd 1i1bVQfBA71cgJ4M5tco53OACGYpyvMW4RyUpKmpPdwOOt3KKanaRFp1kr2UULMNlOY3 QT8RpnWSsEaTnTXturDvTFJkdlwMy8c38/UPpLyb9quLDYeIFGNuUXwOnDEN/7Ait2yI vX+KBldjtJJb2c0MROg7Pnl/qIJJukUzMVkdfDOCoUybwTYyZCBrng6SpCbb9WKsBa4b 1123ZkAjoiGxJ6fbXIVhxDEsL+qHqGqlRYtT/c9lwWmW6c4hQhwADa1pmU+Pq2mBppr1 b86g== X-Received: by 10.14.3.70 with SMTP id 46mr25629122eeg.2.1362915596067; Sun, 10 Mar 2013 04:39:56 -0700 (PDT) Received: from Athlon64X2-5000.site (ip-178-200-115-25.unitymediagroup.de. [178.200.115.25]) by mx.google.com with ESMTPS id q5sm17850013eeo.17.2013.03.10.04.39.54 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 10 Mar 2013 04:39:55 -0700 (PDT) From: =?UTF-8?q?Frank=20Sch=C3=A4fer?= To: mchehab@redhat.com Cc: hverkuil@xs4all.nl, linux-media@vger.kernel.org, =?UTF-8?q?Frank=20Sch=C3=A4fer?= Subject: [RFC PATCH 2/2] bttv: fix audio mute on device close for the radio device node Date: Sun, 10 Mar 2013 12:40:35 +0100 Message-Id: <1362915635-5431-2-git-send-email-fschaefer.oss@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1362915635-5431-1-git-send-email-fschaefer.oss@googlemail.com> References: <1362915635-5431-1-git-send-email-fschaefer.oss@googlemail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.3.10.113318 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_1099 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' Signed-off-by: Frank Schäfer --- drivers/media/pci/bt8xx/bttv-driver.c | 5 ++++- 1 Datei geändert, 4 Zeilen hinzugefügt(+), 1 Zeile entfernt(-) diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 2c09bc5..74977f7 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c @@ -3227,6 +3227,7 @@ static int radio_open(struct file *file) v4l2_fh_init(&fh->fh, vdev); btv->radio_user++; + audio_mute(btv, btv->mute); v4l2_fh_add(&fh->fh); @@ -3248,8 +3249,10 @@ static int radio_release(struct file *file) bttv_call_all(btv, core, ioctl, SAA6588_CMD_CLOSE, &cmd); - if (btv->radio_user == 0) + if (btv->radio_user == 0) { btv->has_radio_tuner = 0; + audio_mute(btv, 1); + } return 0; }