mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
sound fixes for 5.2-rc1
Just a few HD-audio fixes, most of which are specific to Realtek codecs. -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAlzepbsOHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE82IQ//QpscaQxoFOf6qp3u6pr/F1GhFxCQYkKMMLOE T4BckQXVS2V+Gqoc3rJWj7066Ik6a6bVVBBmBieQOXmXtHOVMoAHRII63xtDdIp7 uBAKofDZKljQzkm63INMZ7hk9IgZzVOpdshuuoenSMwZ0Ml6CeU0N9ehfvD4DRDa bDC+q3hyrftNf/8Dujd4EO7noSRaz0qurBbjRGeeiXkiewSKEcY0a82KvXsGo3E1 rHhd56qW0cYjSaVZCDkRlbm8S5RunJTF/LtzBAeIvkyi1Bli1YVwVQrRKBUpIwdq ySyoshQg5cZEk1GPv1jfLNyFX6sxdVVAqrFF2i2BpOn7qWCEMpWdfk4qlO4OItKz jBonIT793lLuWkwPJ9UAWSMY4bnyAOcWev4ITGbNG9uQ//UcAoXSSG/XbG48HSvK PyCCYnmVYZ5+wsEVysP5gSV0A1/08naSpmDhs5CSTexwL50TFdq5pFWjbBg0koda cLpCFyDqFS0l1AJRHTv3s73aejcpp/c2gtmJ+TkflGhJsUCnW4fridvR+iiTZSJr ZW+H18soQyfw2cfCVxCOc4VqlaBna+QYRLg8T6sRXVHZa8NVAGtbeUJyDIqIW7oK iGTY7qQ18gtv8vCjP9xaGHnMbBn5/MlTnzJGy1ViyVDpw5ygdFZBnsCKUXQ0tAYQ cEWfjO8= =ypSg -----END PGP SIGNATURE----- Merge tag 'sound-fix-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just a few HD-audio fixes, most of which are specific to Realtek codecs" * tag 'sound-fix-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Fix for Lenovo B50-70 inverted internal microphone bug ALSA: hda: Fix race between creating and refreshing sysfs entries ALSA: hda/realtek - Corrected fixup for System76 Gazelle (gaze14) ALSA: hda/realtek - Avoid superfluous COEF EAPD setups ALSA: hda/realtek - Fixup headphone noise via runtime suspend
This commit is contained in:
commit
72cf0b0741
4 changed files with 80 additions and 27 deletions
|
|
@ -55,6 +55,7 @@ int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus,
|
|||
codec->bus = bus;
|
||||
codec->addr = addr;
|
||||
codec->type = HDA_DEV_CORE;
|
||||
mutex_init(&codec->widget_lock);
|
||||
pm_runtime_set_active(&codec->dev);
|
||||
pm_runtime_get_noresume(&codec->dev);
|
||||
atomic_set(&codec->in_pm, 0);
|
||||
|
|
@ -141,7 +142,9 @@ int snd_hdac_device_register(struct hdac_device *codec)
|
|||
err = device_add(&codec->dev);
|
||||
if (err < 0)
|
||||
return err;
|
||||
mutex_lock(&codec->widget_lock);
|
||||
err = hda_widget_sysfs_init(codec);
|
||||
mutex_unlock(&codec->widget_lock);
|
||||
if (err < 0) {
|
||||
device_del(&codec->dev);
|
||||
return err;
|
||||
|
|
@ -158,7 +161,9 @@ EXPORT_SYMBOL_GPL(snd_hdac_device_register);
|
|||
void snd_hdac_device_unregister(struct hdac_device *codec)
|
||||
{
|
||||
if (device_is_registered(&codec->dev)) {
|
||||
mutex_lock(&codec->widget_lock);
|
||||
hda_widget_sysfs_exit(codec);
|
||||
mutex_unlock(&codec->widget_lock);
|
||||
device_del(&codec->dev);
|
||||
snd_hdac_bus_remove_device(codec->bus, codec);
|
||||
}
|
||||
|
|
@ -404,7 +409,9 @@ int snd_hdac_refresh_widgets(struct hdac_device *codec, bool sysfs)
|
|||
}
|
||||
|
||||
if (sysfs) {
|
||||
mutex_lock(&codec->widget_lock);
|
||||
err = hda_widget_sysfs_reinit(codec, start_nid, nums);
|
||||
mutex_unlock(&codec->widget_lock);
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -395,6 +395,7 @@ static int widget_tree_create(struct hdac_device *codec)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* call with codec->widget_lock held */
|
||||
int hda_widget_sysfs_init(struct hdac_device *codec)
|
||||
{
|
||||
int err;
|
||||
|
|
@ -411,11 +412,13 @@ int hda_widget_sysfs_init(struct hdac_device *codec)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* call with codec->widget_lock held */
|
||||
void hda_widget_sysfs_exit(struct hdac_device *codec)
|
||||
{
|
||||
widget_tree_free(codec);
|
||||
}
|
||||
|
||||
/* call with codec->widget_lock held */
|
||||
int hda_widget_sysfs_reinit(struct hdac_device *codec,
|
||||
hda_nid_t start_nid, int num_nodes)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue