From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932462AbdJZOSe (ORCPT ); Thu, 26 Oct 2017 10:18:34 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:60942 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932290AbdJZOQ4 (ORCPT ); Thu, 26 Oct 2017 10:16:56 -0400 From: Mark Brown To: Carlo Caione Cc: Mark Brown , linux@endlessm.com, bardliao@realtek.com, oder_chiou@realtek.com, pierre-louis.bossart@linux.intel.com, broonie@kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.com, albertchen@realtek.com, edgar_shen@realtek.com, alsa-devel@alsa-project.org Subject: Applied "ASoC: intel: byt: Add headset jack" to the asoc tree In-Reply-To: <20171020111859.2448-3-carlo@caione.org> Message-Id: <20171026141650.3D56F44005B@finisterre.ee.mobilebroadband> Date: Thu, 26 Oct 2017 15:16:50 +0100 (BST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: intel: byt: Add headset jack has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >>From d9f8f9b2f3e2b95875cd59ae5c3276e4662e7513 Mon Sep 17 00:00:00 2001 From: Carlo Caione Date: Fri, 20 Oct 2017 12:18:56 +0100 Subject: [PATCH] ASoC: intel: byt: Add headset jack Introduce an headset jack in the machine driver and register it to the codec driver. Signed-off-by: Carlo Caione Signed-off-by: Mark Brown --- sound/soc/intel/boards/bytcr_rt5651.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 51de1bbe8ecd..0df9067e4382 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -47,6 +47,7 @@ enum { struct byt_rt5651_private { struct clk *mclk; + struct snd_soc_jack jack; }; static unsigned long byt_rt5651_quirk = BYT_RT5651_DMIC_MAP | @@ -177,6 +178,17 @@ static const struct snd_kcontrol_new byt_rt5651_controls[] = { SOC_DAPM_PIN_SWITCH("Speaker"), }; +static struct snd_soc_jack_pin bytcr_jack_pins[] = { + { + .pin = "Headphone", + .mask = SND_JACK_HEADPHONE, + }, + { + .pin = "Headset Mic", + .mask = SND_JACK_MICROPHONE, + }, +}; + static int byt_rt5651_aif1_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { @@ -244,6 +256,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = { static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) { struct snd_soc_card *card = runtime->card; + struct snd_soc_codec *codec = runtime->codec; struct byt_rt5651_private *priv = snd_soc_card_get_drvdata(card); const struct snd_soc_dapm_route *custom_map; int num_routes; @@ -301,6 +314,16 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) dev_err(card->dev, "unable to set MCLK rate\n"); } + ret = snd_soc_card_jack_new(runtime->card, "Headset", + SND_JACK_HEADSET, &priv->jack, + bytcr_jack_pins, ARRAY_SIZE(bytcr_jack_pins)); + if (ret) { + dev_err(runtime->dev, "Headset jack creation failed %d\n", ret); + return ret; + } + + rt5651_set_jack_detect(codec, &priv->jack); + return ret; } -- 2.14.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Applied "ASoC: intel: byt: Add headset jack" to the asoc tree Date: Thu, 26 Oct 2017 15:16:50 +0100 (BST) Message-ID: <20171026141650.3D56F44005B@finisterre.ee.mobilebroadband> References: <20171020111859.2448-3-carlo@caione.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 73772266E15 for ; Thu, 26 Oct 2017 16:16:51 +0200 (CEST) In-Reply-To: <20171020111859.2448-3-carlo@caione.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Carlo Caione Cc: oder_chiou@realtek.com, alsa-devel@alsa-project.org, edgar_shen@realtek.com, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, linux-kernel@vger.kernel.org, albertchen@realtek.com, broonie@kernel.org, bardliao@realtek.com, linux@endlessm.com List-Id: alsa-devel@alsa-project.org The patch ASoC: intel: byt: Add headset jack has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >>From d9f8f9b2f3e2b95875cd59ae5c3276e4662e7513 Mon Sep 17 00:00:00 2001 From: Carlo Caione Date: Fri, 20 Oct 2017 12:18:56 +0100 Subject: [PATCH] ASoC: intel: byt: Add headset jack Introduce an headset jack in the machine driver and register it to the codec driver. Signed-off-by: Carlo Caione Signed-off-by: Mark Brown --- sound/soc/intel/boards/bytcr_rt5651.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 51de1bbe8ecd..0df9067e4382 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -47,6 +47,7 @@ enum { struct byt_rt5651_private { struct clk *mclk; + struct snd_soc_jack jack; }; static unsigned long byt_rt5651_quirk = BYT_RT5651_DMIC_MAP | @@ -177,6 +178,17 @@ static const struct snd_kcontrol_new byt_rt5651_controls[] = { SOC_DAPM_PIN_SWITCH("Speaker"), }; +static struct snd_soc_jack_pin bytcr_jack_pins[] = { + { + .pin = "Headphone", + .mask = SND_JACK_HEADPHONE, + }, + { + .pin = "Headset Mic", + .mask = SND_JACK_MICROPHONE, + }, +}; + static int byt_rt5651_aif1_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { @@ -244,6 +256,7 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = { static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) { struct snd_soc_card *card = runtime->card; + struct snd_soc_codec *codec = runtime->codec; struct byt_rt5651_private *priv = snd_soc_card_get_drvdata(card); const struct snd_soc_dapm_route *custom_map; int num_routes; @@ -301,6 +314,16 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) dev_err(card->dev, "unable to set MCLK rate\n"); } + ret = snd_soc_card_jack_new(runtime->card, "Headset", + SND_JACK_HEADSET, &priv->jack, + bytcr_jack_pins, ARRAY_SIZE(bytcr_jack_pins)); + if (ret) { + dev_err(runtime->dev, "Headset jack creation failed %d\n", ret); + return ret; + } + + rt5651_set_jack_detect(codec, &priv->jack); + return ret; } -- 2.14.1