Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Quite a bunch of small fixes that have been gathered since the last
pull, including changes like below:

- HD-audio runtime PM fixes and refactoring

- HD-audio and USB-audio quirks

- SOF warning fix

- Various ASoC device-specific fixes for Intel, Qualcomm, etc"

* tag 'sound-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits)
ALSA: usb-audio: Add implicit feedback quirk for Qu-16
ASoC: mchp-spdiftx: Do not set Validity bit(s)
ALSA: usb-audio: Add implicit feedback quirk for MODX
ALSA: usb-audio: add usb vendor id as DSD-capable for Khadas devices
ALSA: hda/realtek - Enable headphone for ASUS TM420
ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link()
ASoC: qcom: lpass-cpu: Fix clock disable failure
ASoC: qcom: lpass-sc7180: Fix MI2S bitwidth field bit positions
ASoC: codecs: wcd9335: Set digital gain range correctly
ASoC: codecs: wcd934x: Set digital gain range correctly
ALSA: hda: Reinstate runtime_allow() for all hda controllers
ALSA: hda: Separate runtime and system suspend
ALSA: hda: Refactor codec PM to use direct-complete optimization
ALSA: hda/realtek - Fixed HP headset Mic can't be detected
ALSA: usb-audio: Add implicit feedback quirk for Zoom UAC-2
ALSA: make snd_kcontrol_new name a normal string
ALSA: fix kernel-doc markups
ASoC: SOF: loader: handle all SOF_IPC_EXT types
ASoC: cs42l51: manage mclk shutdown delay
ASoC: qcom: sdm845: set driver name correctly
...

+265 -117
+1 -1
include/sound/control.h
··· 42 42 snd_ctl_elem_iface_t iface; /* interface identifier */ 43 43 unsigned int device; /* device/client number */ 44 44 unsigned int subdevice; /* subdevice (substream) number */ 45 - const unsigned char *name; /* ASCII name of item */ 45 + const char *name; /* ASCII name of item */ 46 46 unsigned int index; /* index of item */ 47 47 unsigned int access; /* access rights */ 48 48 unsigned int count; /* count of same elements */
+2 -1
include/sound/core.h
··· 332 332 #define snd_BUG() WARN(1, "BUG?\n") 333 333 334 334 /** 335 - * Suppress high rates of output when CONFIG_SND_DEBUG is enabled. 335 + * snd_printd_ratelimit - Suppress high rates of output when 336 + * CONFIG_SND_DEBUG is enabled. 336 337 */ 337 338 #define snd_printd_ratelimit() printk_ratelimit() 338 339
+2 -2
include/sound/pcm.h
··· 1284 1284 } 1285 1285 1286 1286 /** 1287 - * snd_pcm_sgbuf_chunk_size - Compute the max size that fits within the contig. 1288 - * page from the given size 1287 + * snd_pcm_sgbuf_get_chunk_size - Compute the max size that fits within the 1288 + * contig. page from the given size 1289 1289 * @substream: PCM substream 1290 1290 * @ofs: byte offset 1291 1291 * @size: byte size to examine
+1 -1
include/uapi/sound/compress_offload.h
··· 144 144 __u32 value[8]; 145 145 } __attribute__((packed, aligned(4))); 146 146 147 - /** 147 + /* 148 148 * compress path ioctl definitions 149 149 * SNDRV_COMPRESS_GET_CAPS: Query capability of DSP 150 150 * SNDRV_COMPRESS_GET_CODEC_CAPS: Query capability of a codec
+2 -2
sound/core/control.c
··· 1925 1925 1926 1926 #ifdef CONFIG_COMPAT 1927 1927 /** 1928 - * snd_ctl_unregister_ioctl - de-register the device-specific compat 32bit 1929 - * control-ioctls 1928 + * snd_ctl_unregister_ioctl_compat - de-register the device-specific compat 1929 + * 32bit control-ioctls 1930 1930 * @fcn: ioctl callback function to unregister 1931 1931 */ 1932 1932 int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn)
+2 -1
sound/core/pcm_dmaengine.c
··· 356 356 EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_close); 357 357 358 358 /** 359 - * snd_dmaengine_pcm_release_chan_close - Close a dmaengine based PCM substream and release channel 359 + * snd_dmaengine_pcm_close_release_chan - Close a dmaengine based PCM 360 + * substream and release channel 360 361 * @substream: PCM substream 361 362 * 362 363 * Releases the DMA channel associated with the PCM substream.
+1 -1
sound/core/pcm_lib.c
··· 490 490 EXPORT_SYMBOL(snd_pcm_set_ops); 491 491 492 492 /** 493 - * snd_pcm_sync - set the PCM sync id 493 + * snd_pcm_set_sync - set the PCM sync id 494 494 * @substream: the pcm substream 495 495 * 496 496 * Sets the PCM sync identifier for the card.
+2 -2
sound/core/pcm_native.c
··· 112 112 EXPORT_SYMBOL_GPL(snd_pcm_stream_lock); 113 113 114 114 /** 115 - * snd_pcm_stream_lock - Unlock the PCM stream 115 + * snd_pcm_stream_unlock - Unlock the PCM stream 116 116 * @substream: PCM substream 117 117 * 118 118 * This unlocks the PCM stream that has been locked via snd_pcm_stream_lock(). ··· 595 595 } 596 596 597 597 /** 598 - * snd_pcm_hw_param_choose - choose a configuration defined by @params 598 + * snd_pcm_hw_params_choose - choose a configuration defined by @params 599 599 * @pcm: PCM instance 600 600 * @params: the hw_params instance 601 601 *
+2
sound/hda/ext/hdac_ext_controller.c
··· 148 148 return NULL; 149 149 if (bus->idx != bus_idx) 150 150 return NULL; 151 + if (addr < 0 || addr > 31) 152 + return NULL; 151 153 152 154 list_for_each_entry(hlink, &bus->hlink_list, list) { 153 155 for (i = 0; i < HDA_MAX_CODECS; i++) {
+29 -16
sound/pci/hda/hda_codec.c
··· 2934 2934 snd_hdac_leave_pm(&codec->core); 2935 2935 } 2936 2936 2937 - static int hda_codec_runtime_suspend(struct device *dev) 2937 + static int hda_codec_suspend(struct device *dev) 2938 2938 { 2939 2939 struct hda_codec *codec = dev_to_hda_codec(dev); 2940 2940 unsigned int state; ··· 2953 2953 return 0; 2954 2954 } 2955 2955 2956 - static int hda_codec_runtime_resume(struct device *dev) 2956 + static int hda_codec_resume(struct device *dev) 2957 2957 { 2958 2958 struct hda_codec *codec = dev_to_hda_codec(dev); 2959 2959 ··· 2967 2967 pm_runtime_mark_last_busy(dev); 2968 2968 return 0; 2969 2969 } 2970 + 2971 + static int hda_codec_runtime_suspend(struct device *dev) 2972 + { 2973 + return hda_codec_suspend(dev); 2974 + } 2975 + 2976 + static int hda_codec_runtime_resume(struct device *dev) 2977 + { 2978 + return hda_codec_resume(dev); 2979 + } 2980 + 2970 2981 #endif /* CONFIG_PM */ 2971 2982 2972 2983 #ifdef CONFIG_PM_SLEEP 2973 - static int hda_codec_force_resume(struct device *dev) 2984 + static int hda_codec_pm_prepare(struct device *dev) 2985 + { 2986 + return pm_runtime_suspended(dev); 2987 + } 2988 + 2989 + static void hda_codec_pm_complete(struct device *dev) 2974 2990 { 2975 2991 struct hda_codec *codec = dev_to_hda_codec(dev); 2976 - int ret; 2977 2992 2978 - ret = pm_runtime_force_resume(dev); 2979 - /* schedule jackpoll work for jack detection update */ 2980 - if (codec->jackpoll_interval || 2981 - (pm_runtime_suspended(dev) && hda_codec_need_resume(codec))) 2982 - schedule_delayed_work(&codec->jackpoll_work, 2983 - codec->jackpoll_interval); 2984 - return ret; 2993 + if (pm_runtime_suspended(dev) && (codec->jackpoll_interval || 2994 + hda_codec_need_resume(codec) || codec->forced_resume)) 2995 + pm_request_resume(dev); 2985 2996 } 2986 2997 2987 2998 static int hda_codec_pm_suspend(struct device *dev) 2988 2999 { 2989 3000 dev->power.power_state = PMSG_SUSPEND; 2990 - return pm_runtime_force_suspend(dev); 3001 + return hda_codec_suspend(dev); 2991 3002 } 2992 3003 2993 3004 static int hda_codec_pm_resume(struct device *dev) 2994 3005 { 2995 3006 dev->power.power_state = PMSG_RESUME; 2996 - return hda_codec_force_resume(dev); 3007 + return hda_codec_resume(dev); 2997 3008 } 2998 3009 2999 3010 static int hda_codec_pm_freeze(struct device *dev) 3000 3011 { 3001 3012 dev->power.power_state = PMSG_FREEZE; 3002 - return pm_runtime_force_suspend(dev); 3013 + return hda_codec_suspend(dev); 3003 3014 } 3004 3015 3005 3016 static int hda_codec_pm_thaw(struct device *dev) 3006 3017 { 3007 3018 dev->power.power_state = PMSG_THAW; 3008 - return hda_codec_force_resume(dev); 3019 + return hda_codec_resume(dev); 3009 3020 } 3010 3021 3011 3022 static int hda_codec_pm_restore(struct device *dev) 3012 3023 { 3013 3024 dev->power.power_state = PMSG_RESTORE; 3014 - return hda_codec_force_resume(dev); 3025 + return hda_codec_resume(dev); 3015 3026 } 3016 3027 #endif /* CONFIG_PM_SLEEP */ 3017 3028 3018 3029 /* referred in hda_bind.c */ 3019 3030 const struct dev_pm_ops hda_codec_driver_pm = { 3020 3031 #ifdef CONFIG_PM_SLEEP 3032 + .prepare = hda_codec_pm_prepare, 3033 + .complete = hda_codec_pm_complete, 3021 3034 .suspend = hda_codec_pm_suspend, 3022 3035 .resume = hda_codec_pm_resume, 3023 3036 .freeze = hda_codec_pm_freeze,
+2 -1
sound/pci/hda/hda_controller.h
··· 41 41 /* 24 unused */ 42 42 #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ 43 43 #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ 44 - #define AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP (1 << 27) /* Workaround for spurious wakeups after suspend */ 44 + /* 27 unused */ 45 45 #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */ 46 46 #define AZX_DCAPS_NO_MSI64 (1 << 29) /* Stick to 32-bit MSIs */ 47 47 #define AZX_DCAPS_SEPARATE_STREAM_TAG (1 << 30) /* capture and playback use separate stream tag */ ··· 143 143 unsigned int align_buffer_size:1; 144 144 unsigned int region_requested:1; 145 145 unsigned int disabled:1; /* disabled by vga_switcheroo */ 146 + unsigned int pm_prepared:1; 146 147 147 148 /* GTS present */ 148 149 unsigned int gts_present:1;
+35 -28
sound/pci/hda/hda_intel.c
··· 297 297 /* PCH for HSW/BDW; with runtime PM */ 298 298 /* no i915 binding for this as HSW/BDW has another controller for HDMI */ 299 299 #define AZX_DCAPS_INTEL_PCH \ 300 - (AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_PM_RUNTIME |\ 301 - AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP) 300 + (AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_PM_RUNTIME) 302 301 303 302 /* HSW HDMI */ 304 303 #define AZX_DCAPS_INTEL_HASWELL \ ··· 984 985 display_power(chip, false); 985 986 } 986 987 987 - static void __azx_runtime_resume(struct azx *chip, bool from_rt) 988 + static void __azx_runtime_resume(struct azx *chip) 988 989 { 989 990 struct hda_intel *hda = container_of(chip, struct hda_intel, chip); 990 991 struct hdac_bus *bus = azx_bus(chip); ··· 1001 1002 azx_init_pci(chip); 1002 1003 hda_intel_init_chip(chip, true); 1003 1004 1004 - if (from_rt) { 1005 + /* Avoid codec resume if runtime resume is for system suspend */ 1006 + if (!chip->pm_prepared) { 1005 1007 list_for_each_codec(codec, &chip->bus) { 1006 1008 if (codec->relaxed_resume) 1007 1009 continue; ··· 1018 1018 } 1019 1019 1020 1020 #ifdef CONFIG_PM_SLEEP 1021 + static int azx_prepare(struct device *dev) 1022 + { 1023 + struct snd_card *card = dev_get_drvdata(dev); 1024 + struct azx *chip; 1025 + 1026 + chip = card->private_data; 1027 + chip->pm_prepared = 1; 1028 + 1029 + /* HDA controller always requires different WAKEEN for runtime suspend 1030 + * and system suspend, so don't use direct-complete here. 1031 + */ 1032 + return 0; 1033 + } 1034 + 1035 + static void azx_complete(struct device *dev) 1036 + { 1037 + struct snd_card *card = dev_get_drvdata(dev); 1038 + struct azx *chip; 1039 + 1040 + chip = card->private_data; 1041 + chip->pm_prepared = 0; 1042 + } 1043 + 1021 1044 static int azx_suspend(struct device *dev) 1022 1045 { 1023 1046 struct snd_card *card = dev_get_drvdata(dev); ··· 1052 1029 1053 1030 chip = card->private_data; 1054 1031 bus = azx_bus(chip); 1055 - snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 1056 - /* An ugly workaround: direct call of __azx_runtime_suspend() and 1057 - * __azx_runtime_resume() for old Intel platforms that suffer from 1058 - * spurious wakeups after S3 suspend 1059 - */ 1060 - if (chip->driver_caps & AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP) 1061 - __azx_runtime_suspend(chip); 1062 - else 1063 - pm_runtime_force_suspend(dev); 1032 + __azx_runtime_suspend(chip); 1064 1033 if (bus->irq >= 0) { 1065 1034 free_irq(bus->irq, chip); 1066 1035 bus->irq = -1; ··· 1081 1066 if (azx_acquire_irq(chip, 1) < 0) 1082 1067 return -EIO; 1083 1068 1084 - if (chip->driver_caps & AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP) 1085 - __azx_runtime_resume(chip, false); 1086 - else 1087 - pm_runtime_force_resume(dev); 1088 - snd_power_change_state(card, SNDRV_CTL_POWER_D0); 1069 + __azx_runtime_resume(chip); 1089 1070 1090 1071 trace_azx_resume(chip); 1091 1072 return 0; ··· 1129 1118 chip = card->private_data; 1130 1119 1131 1120 /* enable controller wake up event */ 1132 - if (snd_power_get_state(card) == SNDRV_CTL_POWER_D0) { 1133 - azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) | 1134 - STATESTS_INT_MASK); 1135 - } 1121 + azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) | STATESTS_INT_MASK); 1136 1122 1137 1123 __azx_runtime_suspend(chip); 1138 1124 trace_azx_runtime_suspend(chip); ··· 1140 1132 { 1141 1133 struct snd_card *card = dev_get_drvdata(dev); 1142 1134 struct azx *chip; 1143 - bool from_rt = snd_power_get_state(card) == SNDRV_CTL_POWER_D0; 1144 1135 1145 1136 if (!azx_is_pm_ready(card)) 1146 1137 return 0; 1147 1138 chip = card->private_data; 1148 - __azx_runtime_resume(chip, from_rt); 1139 + __azx_runtime_resume(chip); 1149 1140 1150 1141 /* disable controller Wake Up event*/ 1151 - if (from_rt) { 1152 - azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) & 1153 - ~STATESTS_INT_MASK); 1154 - } 1142 + azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) & ~STATESTS_INT_MASK); 1155 1143 1156 1144 trace_azx_runtime_resume(chip); 1157 1145 return 0; ··· 1181 1177 static const struct dev_pm_ops azx_pm = { 1182 1178 SET_SYSTEM_SLEEP_PM_OPS(azx_suspend, azx_resume) 1183 1179 #ifdef CONFIG_PM_SLEEP 1180 + .prepare = azx_prepare, 1181 + .complete = azx_complete, 1184 1182 .freeze_noirq = azx_freeze_noirq, 1185 1183 .thaw_noirq = azx_thaw_noirq, 1186 1184 #endif ··· 2362 2356 2363 2357 if (azx_has_pm_runtime(chip)) { 2364 2358 pm_runtime_use_autosuspend(&pci->dev); 2359 + pm_runtime_allow(&pci->dev); 2365 2360 pm_runtime_put_autosuspend(&pci->dev); 2366 2361 } 2367 2362
+56 -11
sound/pci/hda/patch_realtek.c
··· 6008 6008 snd_hda_override_wcaps(codec, 0x03, 0); 6009 6009 } 6010 6010 6011 + static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec) 6012 + { 6013 + switch (codec->core.vendor_id) { 6014 + case 0x10ec0274: 6015 + case 0x10ec0294: 6016 + case 0x10ec0225: 6017 + case 0x10ec0295: 6018 + case 0x10ec0299: 6019 + alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */ 6020 + alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15); 6021 + break; 6022 + case 0x10ec0235: 6023 + case 0x10ec0236: 6024 + case 0x10ec0255: 6025 + case 0x10ec0256: 6026 + alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */ 6027 + alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15); 6028 + break; 6029 + } 6030 + } 6031 + 6011 6032 static void alc295_fixup_chromebook(struct hda_codec *codec, 6012 6033 const struct hda_fixup *fix, int action) 6013 6034 { ··· 6039 6018 spec->ultra_low_power = true; 6040 6019 break; 6041 6020 case HDA_FIXUP_ACT_INIT: 6042 - switch (codec->core.vendor_id) { 6043 - case 0x10ec0295: 6044 - alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */ 6045 - alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15); 6046 - break; 6047 - case 0x10ec0236: 6048 - alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */ 6049 - alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15); 6050 - break; 6051 - } 6021 + alc_combo_jack_hp_jd_restart(codec); 6052 6022 break; 6053 6023 } 6054 6024 } ··· 6093 6081 6094 6082 msleep(100); 6095 6083 alc_write_coef_idx(codec, 0x65, 0x0); 6084 + } 6085 + 6086 + static void alc274_fixup_hp_headset_mic(struct hda_codec *codec, 6087 + const struct hda_fixup *fix, int action) 6088 + { 6089 + switch (action) { 6090 + case HDA_FIXUP_ACT_INIT: 6091 + alc_combo_jack_hp_jd_restart(codec); 6092 + break; 6093 + } 6096 6094 } 6097 6095 6098 6096 /* for hda_fixup_thinkpad_acpi() */ ··· 6299 6277 ALC256_FIXUP_INTEL_NUC8_RUGGED, 6300 6278 ALC255_FIXUP_XIAOMI_HEADSET_MIC, 6301 6279 ALC274_FIXUP_HP_MIC, 6280 + ALC274_FIXUP_HP_HEADSET_MIC, 6281 + ALC256_FIXUP_ASUS_HPE, 6302 6282 }; 6303 6283 6304 6284 static const struct hda_fixup alc269_fixups[] = { ··· 7688 7664 { } 7689 7665 }, 7690 7666 }, 7667 + [ALC274_FIXUP_HP_HEADSET_MIC] = { 7668 + .type = HDA_FIXUP_FUNC, 7669 + .v.func = alc274_fixup_hp_headset_mic, 7670 + .chained = true, 7671 + .chain_id = ALC274_FIXUP_HP_MIC 7672 + }, 7673 + [ALC256_FIXUP_ASUS_HPE] = { 7674 + .type = HDA_FIXUP_VERBS, 7675 + .v.verbs = (const struct hda_verb[]) { 7676 + /* Set EAPD high */ 7677 + { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f }, 7678 + { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 }, 7679 + { } 7680 + }, 7681 + .chained = true, 7682 + .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 7683 + }, 7691 7684 }; 7692 7685 7693 7686 static const struct snd_pci_quirk alc269_fixup_tbl[] = { ··· 7856 7815 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED), 7857 7816 SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED), 7858 7817 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT), 7859 - SND_PCI_QUIRK(0x103c, 0x874e, "HP", ALC274_FIXUP_HP_MIC), 7860 7818 SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED), 7861 7819 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED), 7862 7820 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED), ··· 7888 7848 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 7889 7849 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 7890 7850 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), 7851 + SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE), 7891 7852 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), 7892 7853 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), 7893 7854 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), ··· 8379 8338 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 8380 8339 {0x1a, 0x90a70130}, 8381 8340 {0x1b, 0x90170110}, 8341 + {0x21, 0x03211020}), 8342 + SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC, 8343 + {0x17, 0x90170110}, 8344 + {0x19, 0x03a11030}, 8382 8345 {0x21, 0x03211020}), 8383 8346 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, 8384 8347 {0x12, 0x90a60130},
-1
sound/soc/atmel/mchp-spdiftx.c
··· 487 487 } 488 488 mchp_spdiftx_channel_status_write(dev); 489 489 spin_unlock_irqrestore(&ctrl->lock, flags); 490 - mr |= SPDIFTX_MR_VALID1 | SPDIFTX_MR_VALID2; 491 490 492 491 if (dev->gclk_enabled) { 493 492 clk_disable_unprepare(dev->gclk);
+21 -1
sound/soc/codecs/cs42l51.c
··· 254 254 &cs42l51_adcr_mux_controls), 255 255 }; 256 256 257 + static int mclk_event(struct snd_soc_dapm_widget *w, 258 + struct snd_kcontrol *kcontrol, int event) 259 + { 260 + struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); 261 + struct cs42l51_private *cs42l51 = snd_soc_component_get_drvdata(comp); 262 + 263 + switch (event) { 264 + case SND_SOC_DAPM_PRE_PMU: 265 + return clk_prepare_enable(cs42l51->mclk_handle); 266 + case SND_SOC_DAPM_POST_PMD: 267 + /* Delay mclk shutdown to fulfill power-down sequence requirements */ 268 + msleep(20); 269 + clk_disable_unprepare(cs42l51->mclk_handle); 270 + break; 271 + } 272 + 273 + return 0; 274 + } 275 + 257 276 static const struct snd_soc_dapm_widget cs42l51_dapm_mclk_widgets[] = { 258 - SND_SOC_DAPM_CLOCK_SUPPLY("MCLK") 277 + SND_SOC_DAPM_SUPPLY("MCLK", SND_SOC_NOPM, 0, 0, mclk_event, 278 + SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), 259 279 }; 260 280 261 281 static const struct snd_soc_dapm_route cs42l51_routes[] = {
+1 -1
sound/soc/codecs/wcd9335.c
··· 618 618 "ZERO", "RX_MIX_TX8", "DEC8", "DEC8_192" 619 619 }; 620 620 621 - static const DECLARE_TLV_DB_SCALE(digital_gain, 0, 1, 0); 621 + static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400); 622 622 static const DECLARE_TLV_DB_SCALE(line_gain, 0, 7, 1); 623 623 static const DECLARE_TLV_DB_SCALE(analog_gain, 0, 25, 1); 624 624 static const DECLARE_TLV_DB_SCALE(ear_pa_gain, 0, 150, 0);
+1 -1
sound/soc/codecs/wcd934x.c
··· 551 551 struct soc_bytes_ext bytes_ext; 552 552 }; 553 553 554 - static const DECLARE_TLV_DB_SCALE(digital_gain, 0, 1, 0); 554 + static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400); 555 555 static const DECLARE_TLV_DB_SCALE(line_gain, 0, 7, 1); 556 556 static const DECLARE_TLV_DB_SCALE(analog_gain, 0, 25, 1); 557 557 static const DECLARE_TLV_DB_SCALE(ear_pa_gain, 0, 150, 0);
+2
sound/soc/codecs/wsa881x.c
··· 1026 1026 .id = 0, 1027 1027 .playback = { 1028 1028 .stream_name = "SPKR Playback", 1029 + .rates = SNDRV_PCM_RATE_48000, 1030 + .formats = SNDRV_PCM_FMTBIT_S16_LE, 1029 1031 .rate_max = 48000, 1030 1032 .rate_min = 48000, 1031 1033 .channels_min = 1,
-18
sound/soc/intel/Kconfig
··· 15 15 16 16 if SND_SOC_INTEL_SST_TOPLEVEL 17 17 18 - config SND_SST_IPC 19 - tristate 20 - # This option controls the IPC core for HiFi2 platforms 21 - 22 - config SND_SST_IPC_PCI 23 - tristate 24 - select SND_SST_IPC 25 - # This option controls the PCI-based IPC for HiFi2 platforms 26 - # (Medfield, Merrifield). 27 - 28 - config SND_SST_IPC_ACPI 29 - tristate 30 - select SND_SST_IPC 31 - # This option controls the ACPI-based IPC for HiFi2 platforms 32 - # (Baytrail, Cherrytrail) 33 - 34 18 config SND_SOC_INTEL_SST 35 19 tristate 36 20 ··· 41 57 config SND_SST_ATOM_HIFI2_PLATFORM_PCI 42 58 tristate "PCI HiFi2 (Merrifield) Platforms" 43 59 depends on X86 && PCI 44 - select SND_SST_IPC_PCI 45 60 select SND_SST_ATOM_HIFI2_PLATFORM 46 61 help 47 62 If you have a Intel Merrifield/Edison platform, then ··· 53 70 tristate "ACPI HiFi2 (Baytrail, Cherrytrail) Platforms" 54 71 default ACPI 55 72 depends on X86 && ACPI && PCI 56 - select SND_SST_IPC_ACPI 57 73 select SND_SST_ATOM_HIFI2_PLATFORM 58 74 select SND_SOC_ACPI_INTEL_MATCH 59 75 select IOSF_MBI
+1 -1
sound/soc/intel/atom/Makefile
··· 6 6 obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM) += snd-soc-sst-atom-hifi2-platform.o 7 7 8 8 # DSP driver 9 - obj-$(CONFIG_SND_SST_IPC) += sst/ 9 + obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM) += sst/
+3 -3
sound/soc/intel/atom/sst/Makefile
··· 3 3 snd-intel-sst-pci-objs += sst_pci.o 4 4 snd-intel-sst-acpi-objs += sst_acpi.o 5 5 6 - obj-$(CONFIG_SND_SST_IPC) += snd-intel-sst-core.o 7 - obj-$(CONFIG_SND_SST_IPC_PCI) += snd-intel-sst-pci.o 8 - obj-$(CONFIG_SND_SST_IPC_ACPI) += snd-intel-sst-acpi.o 6 + obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM) += snd-intel-sst-core.o 7 + obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI) += snd-intel-sst-pci.o 8 + obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI) += snd-intel-sst-acpi.o
+31 -8
sound/soc/intel/boards/kbl_rt5663_max98927.c
··· 401 401 struct snd_interval *chan = hw_param_interval(params, 402 402 SNDRV_PCM_HW_PARAM_CHANNELS); 403 403 struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 404 - struct snd_soc_dpcm *dpcm = container_of( 405 - params, struct snd_soc_dpcm, hw_params); 406 - struct snd_soc_dai_link *fe_dai_link = dpcm->fe->dai_link; 407 - struct snd_soc_dai_link *be_dai_link = dpcm->be->dai_link; 404 + struct snd_soc_dpcm *dpcm, *rtd_dpcm = NULL; 405 + 406 + /* 407 + * The following loop will be called only for playback stream 408 + * In this platform, there is only one playback device on every SSP 409 + */ 410 + for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_PLAYBACK, dpcm) { 411 + rtd_dpcm = dpcm; 412 + break; 413 + } 414 + 415 + /* 416 + * This following loop will be called only for capture stream 417 + * In this platform, there is only one capture device on every SSP 418 + */ 419 + for_each_dpcm_fe(rtd, SNDRV_PCM_STREAM_CAPTURE, dpcm) { 420 + rtd_dpcm = dpcm; 421 + break; 422 + } 423 + 424 + if (!rtd_dpcm) 425 + return -EINVAL; 426 + 427 + /* 428 + * The above 2 loops are mutually exclusive based on the stream direction, 429 + * thus rtd_dpcm variable will never be overwritten 430 + */ 408 431 409 432 /* 410 433 * The ADSP will convert the FE rate to 48k, stereo, 24 bit 411 434 */ 412 - if (!strcmp(fe_dai_link->name, "Kbl Audio Port") || 413 - !strcmp(fe_dai_link->name, "Kbl Audio Headset Playback") || 414 - !strcmp(fe_dai_link->name, "Kbl Audio Capture Port")) { 435 + if (!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Port") || 436 + !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Headset Playback") || 437 + !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Capture Port")) { 415 438 rate->min = rate->max = 48000; 416 439 chan->min = chan->max = 2; 417 440 snd_mask_none(fmt); ··· 444 421 * The speaker on the SSP0 supports S16_LE and not S24_LE. 445 422 * thus changing the mask here 446 423 */ 447 - if (!strcmp(be_dai_link->name, "SSP0-Codec")) 424 + if (!strcmp(rtd_dpcm->be->dai_link->name, "SSP0-Codec")) 448 425 snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE); 449 426 450 427 return 0;
+6 -3
sound/soc/intel/catpt/dsp.c
··· 267 267 reg, (reg & CATPT_ISD_DCPWM), 268 268 500, 10000); 269 269 if (ret) { 270 - dev_err(cdev->dev, "await WAITI timeout\n"); 271 - mutex_unlock(&cdev->clk_mutex); 272 - return ret; 270 + dev_warn(cdev->dev, "await WAITI timeout\n"); 271 + /* no signal - only high clock selection allowed */ 272 + if (lp) { 273 + mutex_unlock(&cdev->clk_mutex); 274 + return 0; 275 + } 273 276 } 274 277 } 275 278
+10
sound/soc/intel/catpt/pcm.c
··· 667 667 break; 668 668 } 669 669 670 + /* see if this is a new configuration */ 671 + if (!memcmp(&cdev->devfmt[devfmt.iface], &devfmt, sizeof(devfmt))) 672 + return 0; 673 + 674 + pm_runtime_get_sync(cdev->dev); 675 + 670 676 ret = catpt_ipc_set_device_format(cdev, &devfmt); 677 + 678 + pm_runtime_mark_last_busy(cdev->dev); 679 + pm_runtime_put_autosuspend(cdev->dev); 680 + 671 681 if (ret) 672 682 return CATPT_IPC_ERROR(ret); 673 683
+25 -6
sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c
··· 630 630 }, 631 631 }; 632 632 633 + static const struct snd_kcontrol_new mt8183_da7219_rt1015_snd_controls[] = { 634 + SOC_DAPM_PIN_SWITCH("Left Spk"), 635 + SOC_DAPM_PIN_SWITCH("Right Spk"), 636 + }; 637 + 638 + static const 639 + struct snd_soc_dapm_widget mt8183_da7219_rt1015_dapm_widgets[] = { 640 + SND_SOC_DAPM_SPK("Left Spk", NULL), 641 + SND_SOC_DAPM_SPK("Right Spk", NULL), 642 + SND_SOC_DAPM_PINCTRL("TDM_OUT_PINCTRL", 643 + "aud_tdm_out_on", "aud_tdm_out_off"), 644 + }; 645 + 646 + static const struct snd_soc_dapm_route mt8183_da7219_rt1015_dapm_routes[] = { 647 + {"Left Spk", NULL, "Left SPO"}, 648 + {"Right Spk", NULL, "Right SPO"}, 649 + {"I2S Playback", NULL, "TDM_OUT_PINCTRL"}, 650 + }; 651 + 633 652 static struct snd_soc_card mt8183_da7219_rt1015_card = { 634 653 .name = "mt8183_da7219_rt1015", 635 654 .owner = THIS_MODULE, 636 - .controls = mt8183_da7219_max98357_snd_controls, 637 - .num_controls = ARRAY_SIZE(mt8183_da7219_max98357_snd_controls), 638 - .dapm_widgets = mt8183_da7219_max98357_dapm_widgets, 639 - .num_dapm_widgets = ARRAY_SIZE(mt8183_da7219_max98357_dapm_widgets), 640 - .dapm_routes = mt8183_da7219_max98357_dapm_routes, 641 - .num_dapm_routes = ARRAY_SIZE(mt8183_da7219_max98357_dapm_routes), 655 + .controls = mt8183_da7219_rt1015_snd_controls, 656 + .num_controls = ARRAY_SIZE(mt8183_da7219_rt1015_snd_controls), 657 + .dapm_widgets = mt8183_da7219_rt1015_dapm_widgets, 658 + .num_dapm_widgets = ARRAY_SIZE(mt8183_da7219_rt1015_dapm_widgets), 659 + .dapm_routes = mt8183_da7219_rt1015_dapm_routes, 660 + .num_dapm_routes = ARRAY_SIZE(mt8183_da7219_rt1015_dapm_routes), 642 661 .dai_link = mt8183_da7219_dai_links, 643 662 .num_links = ARRAY_SIZE(mt8183_da7219_dai_links), 644 663 .aux_dev = &mt8183_da7219_max98357_headset_dev,
+10 -4
sound/soc/qcom/lpass-cpu.c
··· 80 80 dev_err(dai->dev, "error in enabling mi2s osr clk: %d\n", ret); 81 81 return ret; 82 82 } 83 + ret = clk_prepare(drvdata->mi2s_bit_clk[dai->driver->id]); 84 + if (ret) { 85 + dev_err(dai->dev, "error in enabling mi2s bit clk: %d\n", ret); 86 + clk_disable_unprepare(drvdata->mi2s_osr_clk[dai->driver->id]); 87 + return ret; 88 + } 83 89 return 0; 84 90 } 85 91 ··· 94 88 { 95 89 struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai); 96 90 97 - clk_disable_unprepare(drvdata->mi2s_bit_clk[dai->driver->id]); 98 - 99 91 clk_disable_unprepare(drvdata->mi2s_osr_clk[dai->driver->id]); 92 + clk_unprepare(drvdata->mi2s_bit_clk[dai->driver->id]); 100 93 } 101 94 102 95 static int lpass_cpu_daiops_hw_params(struct snd_pcm_substream *substream, ··· 308 303 dev_err(dai->dev, "error writing to i2sctl reg: %d\n", 309 304 ret); 310 305 311 - ret = clk_prepare_enable(drvdata->mi2s_bit_clk[id]); 306 + ret = clk_enable(drvdata->mi2s_bit_clk[id]); 312 307 if (ret) { 313 308 dev_err(dai->dev, "error in enabling mi2s bit clk: %d\n", ret); 314 - clk_disable_unprepare(drvdata->mi2s_osr_clk[id]); 309 + clk_disable(drvdata->mi2s_osr_clk[id]); 315 310 return ret; 316 311 } 317 312 ··· 329 324 if (ret) 330 325 dev_err(dai->dev, "error writing to i2sctl reg: %d\n", 331 326 ret); 327 + clk_disable(drvdata->mi2s_bit_clk[dai->driver->id]); 332 328 break; 333 329 } 334 330
+1 -1
sound/soc/qcom/lpass-sc7180.c
··· 188 188 .micmode = REG_FIELD_ID(0x1000, 4, 8, 3, 0x1000), 189 189 .micmono = REG_FIELD_ID(0x1000, 3, 3, 3, 0x1000), 190 190 .wssrc = REG_FIELD_ID(0x1000, 2, 2, 3, 0x1000), 191 - .bitwidth = REG_FIELD_ID(0x1000, 0, 0, 3, 0x1000), 191 + .bitwidth = REG_FIELD_ID(0x1000, 0, 1, 3, 0x1000), 192 192 193 193 .rdma_dyncclk = REG_FIELD_ID(0xC000, 21, 21, 5, 0x1000), 194 194 .rdma_bursten = REG_FIELD_ID(0xC000, 20, 20, 5, 0x1000),
+2
sound/soc/qcom/sdm845.c
··· 17 17 #include "qdsp6/q6afe.h" 18 18 #include "../codecs/rt5663.h" 19 19 20 + #define DRIVER_NAME "sdm845" 20 21 #define DEFAULT_SAMPLE_RATE_48K 48000 21 22 #define DEFAULT_MCLK_RATE 24576000 22 23 #define TDM_BCLK_RATE 6144000 ··· 553 552 if (!data) 554 553 return -ENOMEM; 555 554 555 + card->driver_name = DRIVER_NAME; 556 556 card->dapm_widgets = sdm845_snd_widgets; 557 557 card->num_dapm_widgets = ARRAY_SIZE(sdm845_snd_widgets); 558 558 card->dev = dev;
+1 -1
sound/soc/soc-core.c
··· 2341 2341 } 2342 2342 2343 2343 /** 2344 - * snd_soc_unregister_dai - Unregister DAIs from the ASoC core 2344 + * snd_soc_unregister_dais - Unregister DAIs from the ASoC core 2345 2345 * 2346 2346 * @component: The component for which the DAIs should be unregistered 2347 2347 */
+1 -1
sound/soc/soc-dapm.c
··· 1276 1276 } 1277 1277 1278 1278 /** 1279 - * snd_soc_dapm_get_connected_widgets - query audio path and it's widgets. 1279 + * snd_soc_dapm_dai_get_connected_widgets - query audio path and it's widgets. 1280 1280 * @dai: the soc DAI. 1281 1281 * @stream: stream direction. 1282 1282 * @list: list of active widgets for this stream.
+5
sound/soc/sof/loader.c
··· 118 118 case SOF_IPC_EXT_CC_INFO: 119 119 ret = get_cc_info(sdev, ext_hdr); 120 120 break; 121 + case SOF_IPC_EXT_UNUSED: 122 + case SOF_IPC_EXT_PROBE_INFO: 123 + case SOF_IPC_EXT_USER_ABI_INFO: 124 + /* They are supported but we don't do anything here */ 125 + break; 121 126 default: 122 127 dev_warn(sdev->dev, "warning: unknown ext header type %d size 0x%x\n", 123 128 ext_hdr->type, ext_hdr->hdr.size);
+6
sound/usb/pcm.c
··· 336 336 switch (subs->stream->chip->usb_id) { 337 337 case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */ 338 338 case USB_ID(0x0763, 0x2031): /* M-Audio Fast Track C600 */ 339 + case USB_ID(0x22f0, 0x0006): /* Allen&Heath Qu-16 */ 339 340 ep = 0x81; 340 341 ifnum = 3; 341 342 goto add_sync_ep_from_ifnum; ··· 346 345 ifnum = 2; 347 346 goto add_sync_ep_from_ifnum; 348 347 case USB_ID(0x2466, 0x8003): /* Fractal Audio Axe-Fx II */ 348 + case USB_ID(0x0499, 0x172a): /* Yamaha MODX */ 349 349 ep = 0x86; 350 350 ifnum = 2; 351 351 goto add_sync_ep_from_ifnum; 352 352 case USB_ID(0x2466, 0x8010): /* Fractal Audio Axe-Fx III */ 353 353 ep = 0x81; 354 + ifnum = 2; 355 + goto add_sync_ep_from_ifnum; 356 + case USB_ID(0x1686, 0xf029): /* Zoom UAC-2 */ 357 + ep = 0x82; 354 358 ifnum = 2; 355 359 goto add_sync_ep_from_ifnum; 356 360 case USB_ID(0x1397, 0x0001): /* Behringer UFX1604 */
+1
sound/usb/quirks.c
··· 1800 1800 case 0x278b: /* Rotel? */ 1801 1801 case 0x292b: /* Gustard/Ess based devices */ 1802 1802 case 0x2ab6: /* T+A devices */ 1803 + case 0x3353: /* Khadas devices */ 1803 1804 case 0x3842: /* EVGA */ 1804 1805 case 0xc502: /* HiBy devices */ 1805 1806 if (fp->dsd_raw)