summaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorBard liao2019-04-27 22:53:40 +0200
committerTakashi Iwai2019-04-29 09:12:09 +0200
commitb60ee2e281b6c67cbe0bb8412f3cae53903173c6 (patch)
treecb8f58f05f6f98fac939124845c1eb459a976358 /sound/usb
parentALSA: hda: fix unregister device twice on ASoC driver (diff)
downloadkernel-qcow2-linux-b60ee2e281b6c67cbe0bb8412f3cae53903173c6.tar.gz
kernel-qcow2-linux-b60ee2e281b6c67cbe0bb8412f3cae53903173c6.tar.xz
kernel-qcow2-linux-b60ee2e281b6c67cbe0bb8412f3cae53903173c6.zip
ASoC: hdac_hda: overwrite hdev type to HDA_DEV_ASOC
In ASoC driver, snd_hdac_device_register() will be called by snd_hdac_ext_bus_device_init() and snd_hdac_device_unregister() will called by snd_hdac_ext_bus_device_remove(). However when ASoC codec driver call snd_hda_codec_device_new() to create a new hda codec, it will assign snd_hda_codec_dev_free() to the dev_free ops and snd_hda_codec_dev_free() will call snd_hdac_device_unregister(). As a result, snd_hdac_device_unregister() will be called twice in ASoC driver. To prevent it, we use hdev type to determine if the hda codec is registered by legacy HDA driver or ASoC driver and unregister device in snd_hda_codec_dev_free() only if it is a legacy HDA device. This patch will overwrite the hdev type so that we can know it is a ASoC device. Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
0 files changed, 0 insertions, 0 deletions