wcd938x.c (e700ac213a0f793fb4f83098413303e3dd080892) | wcd938x.c (db0767b8a6e620b99459d2e688c1983c2e5add0d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2// Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. 3 4#include <linux/module.h> 5#include <linux/slab.h> 6#include <linux/platform_device.h> 7#include <linux/device.h> 8#include <linux/delay.h> --- 4130 unchanged lines hidden (view full) --- 4139 return ret; 4140} 4141 4142static int wcd938x_codec_set_jack(struct snd_soc_component *comp, 4143 struct snd_soc_jack *jack, void *data) 4144{ 4145 struct wcd938x_priv *wcd = dev_get_drvdata(comp->dev); 4146 | 1// SPDX-License-Identifier: GPL-2.0-only 2// Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. 3 4#include <linux/module.h> 5#include <linux/slab.h> 6#include <linux/platform_device.h> 7#include <linux/device.h> 8#include <linux/delay.h> --- 4130 unchanged lines hidden (view full) --- 4139 return ret; 4140} 4141 4142static int wcd938x_codec_set_jack(struct snd_soc_component *comp, 4143 struct snd_soc_jack *jack, void *data) 4144{ 4145 struct wcd938x_priv *wcd = dev_get_drvdata(comp->dev); 4146 |
4147 if (!jack) | 4147 if (jack) |
4148 return wcd_mbhc_start(wcd->wcd_mbhc, &wcd->mbhc_cfg, jack); | 4148 return wcd_mbhc_start(wcd->wcd_mbhc, &wcd->mbhc_cfg, jack); |
4149 else 4150 wcd_mbhc_stop(wcd->wcd_mbhc); |
|
4149 | 4151 |
4150 wcd_mbhc_stop(wcd->wcd_mbhc); 4151 | |
4152 return 0; 4153} 4154 4155static const struct snd_soc_component_driver soc_codec_dev_wcd938x = { 4156 .name = "wcd938x_codec", 4157 .probe = wcd938x_soc_codec_probe, 4158 .controls = wcd938x_snd_controls, 4159 .num_controls = ARRAY_SIZE(wcd938x_snd_controls), --- 368 unchanged lines hidden --- | 4152 return 0; 4153} 4154 4155static const struct snd_soc_component_driver soc_codec_dev_wcd938x = { 4156 .name = "wcd938x_codec", 4157 .probe = wcd938x_soc_codec_probe, 4158 .controls = wcd938x_snd_controls, 4159 .num_controls = ARRAY_SIZE(wcd938x_snd_controls), --- 368 unchanged lines hidden --- |