snd_jack will be registered based on real capabilities shared by
module's FW instead of parsing widgets and register it with fixed
capabilities. Remove module_info->num_jack, since it is no more
required.
Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
{
int ret;
- if (!module->num_jacks)
- return 0;
-
- /* register jack(s) in case any */
- if (module->num_jacks > 1) {
- dev_err(module->dev, "Currently supports max=1 jack\n");
- return -EINVAL;
- }
-
snprintf(module->jack_name, NAME_SIZE, "GB %d Headset Jack",
module->dev_id);
ret = snd_soc_jack_new(codec, module->jack_name, GBCODEC_JACK_MASK,
/* jack related */
char jack_name[NAME_SIZE];
char button_name[NAME_SIZE];
- int num_jacks;
int jack_type;
int button_status;
struct snd_soc_jack headset_jack;
case snd_soc_dapm_hp:
*dw = (struct snd_soc_dapm_widget)
SND_SOC_DAPM_HP(w->name, gbcodec_event_hp);
- module->num_jacks++;
module->op_devices |= (GBAUDIO_DEVICE_OUT_WIRED_HEADSET
| GBAUDIO_DEVICE_OUT_WIRED_HEADPHONE);
module->ip_devices |= GBAUDIO_DEVICE_IN_WIRED_HEADSET;