ifeq ($(CONFIG_USB_HSIC_USB3613),y)
obj-m += gb-arche.o
endif
-ifeq ($(CONFIG_SND_SOC_DYNAMIC_DAILINK),y)
- obj-m += gb-audio-codec.o
-obj-m += gb-audio-module.o
-endif
ifeq ($(CONFIG_ARCH_MSM8994),y)
+ obj-m += gb-audio-codec.o
+ obj-m += gb-audio-module.o
obj-m += gb-camera.o
endif
obj-m += gb-audio-gb.o
{
int ret;
struct snd_soc_codec *codec;
+ struct snd_card *card;
struct snd_soc_jack *jack = NULL;
if (!gbcodec) {
}
codec = gbcodec->codec;
+ card = codec->card->snd_card;
+
+ down_write(&card->controls_rwsem);
mutex_lock(&gbcodec->lock);
if (module->num_dais) {
"%d:DAIs not supported via gbcodec driver\n",
module->num_dais);
mutex_unlock(&gbcodec->lock);
+ up_write(&card->controls_rwsem);
return -EINVAL;
}
ret = gbaudio_init_jack(module, codec);
if (ret) {
mutex_unlock(&gbcodec->lock);
+ up_write(&card->controls_rwsem);
return ret;
}
if (codec->card->instantiated) {
ret = snd_soc_dapm_new_widgets(&codec->dapm);
if (!ret)
- snd_soc_dapm_link_dai_widgets_component(codec->card,
+ snd_soc_dapm_link_component_dai_widgets(codec->card,
&codec->dapm);
}
dev_dbg(codec->dev, "Registered %s module\n", module->name);
mutex_unlock(&gbcodec->lock);
+ up_write(&card->controls_rwsem);
return 0;
}
EXPORT_SYMBOL(gbaudio_register_module);
if (module->controls) {
dev_dbg(codec->dev, "Removing %d controls\n",
module->num_controls);
- soc_remove_codec_controls(codec, module->controls,
+ snd_soc_remove_codec_controls(codec, module->controls,
module->num_controls);
}
if (module->dapm_widgets) {