From patchwork Tue Apr 14 03:25:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Mengdong" X-Patchwork-Id: 6213621 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 86E7F9F1C4 for ; Tue, 14 Apr 2015 03:15:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9373E20251 for ; Tue, 14 Apr 2015 03:15:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6539C20212 for ; Tue, 14 Apr 2015 03:15:30 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 13F5F2651EF; Tue, 14 Apr 2015 05:15:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 7F52F2619BF; Tue, 14 Apr 2015 05:15:21 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 20617261A5F; Tue, 14 Apr 2015 05:15:20 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id 466432617BB for ; Tue, 14 Apr 2015 05:15:12 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 13 Apr 2015 20:15:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,573,1422950400"; d="scan'208";a="679653253" Received: from amanda-hsw-pc.sh.intel.com ([10.239.159.28]) by orsmga001.jf.intel.com with ESMTP; 13 Apr 2015 20:15:09 -0700 From: mengdong.lin@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de Date: Tue, 14 Apr 2015 11:25:36 +0800 Message-Id: <1428981936-24976-1-git-send-email-mengdong.lin@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <2f716e6b90b7416eb34d35ed1954c7761bfd2050.1428918546.git.mengdong.lin@intel.com> References: <2f716e6b90b7416eb34d35ed1954c7761bfd2050.1428918546.git.mengdong.lin@intel.com> Cc: Mengdong Lin Subject: [alsa-devel] [PATCH v3] ALSA: hda - set GET bit when adding a vendor verb to the codec regmap X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mengdong Lin Some HD-A codecs may add their own vendor 'set' verb to the regmap, thru func snd_hdac_add_vendor_verb(). This patch sets the GET bit (bit 11) when adding the verb so that its peer vendor 'get' verb is actually added. This can avoid I/O error when writing the 'set' verb thru remap, since HD-A regmap internally looks up a writable vendor verb with GET bit set at first. Signed-off-by: Mengdong Lin diff --git a/sound/hda/hdac_regmap.c b/sound/hda/hdac_regmap.c index 1eb4320..9e933c3 100644 --- a/sound/hda/hdac_regmap.c +++ b/sound/hda/hdac_regmap.c @@ -368,7 +368,7 @@ int snd_hdac_regmap_add_vendor_verb(struct hdac_device *codec, if (!p) return -ENOMEM; - *p = verb; + *p = verb | 0x800; /* set GET bit */ return 0; } EXPORT_SYMBOL_GPL(snd_hdac_regmap_add_vendor_verb);