From patchwork Mon Jun 23 13:29:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 4402611 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3C53FBEEAA for ; Mon, 23 Jun 2014 13:32:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46932202DD for ; Mon, 23 Jun 2014 13:31:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9246C20274 for ; Mon, 23 Jun 2014 13:31:53 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 84A84261B36; Mon, 23 Jun 2014 15:31:52 +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 633A72650BE; Mon, 23 Jun 2014 15:30:42 +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 A728F264FBB; Mon, 23 Jun 2014 15:30:40 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by alsa0.perex.cz (Postfix) with ESMTP id 9200D26162E for ; Mon, 23 Jun 2014 15:30:02 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 23 Jun 2014 06:24:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,530,1400050800"; d="scan'208";a="561879374" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.57]) by orsmga002.jf.intel.com with ESMTP; 23 Jun 2014 06:29:59 -0700 From: Jarkko Nikula To: alsa-devel@alsa-project.org Date: Mon, 23 Jun 2014 16:29:40 +0300 Message-Id: <1403530182-5400-4-git-send-email-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1403530182-5400-1-git-send-email-jarkko.nikula@linux.intel.com> References: <1403530182-5400-1-git-send-email-jarkko.nikula@linux.intel.com> Cc: Mark Brown , Jarkko Nikula , Liam Girdwood , Kevin Strasser Subject: [alsa-devel] [PATCH 4/6] ASoC: Intel: byt-max98090: Fix jack type in order to report correctly 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 Pass actual jack type bitmask to snd_soc_jack_new() in order to report also microphone detections and not only headphone. While at it change also jack name and pass also SND_JACK_LINEOUT type. Reported-by: Jin Yao Signed-off-by: Jarkko Nikula --- sound/soc/intel/byt-max98090.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/byt-max98090.c b/sound/soc/intel/byt-max98090.c index 165ab6d6c4a3..3e2e7152ae66 100644 --- a/sound/soc/intel/byt-max98090.c +++ b/sound/soc/intel/byt-max98090.c @@ -108,7 +108,8 @@ static int byt_max98090_init(struct snd_soc_pcm_runtime *runtime) } /* Enable jack detection */ - ret = snd_soc_jack_new(codec, "Headphone", SND_JACK_HEADPHONE, jack); + ret = snd_soc_jack_new(codec, "Headset", + SND_JACK_LINEOUT | SND_JACK_HEADSET, jack); if (ret) return ret;