Skip to content

Commit bb72bbe

Browse files
committed
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 ...
2 parents fc7b66e + a6c9667 commit bb72bbe

33 files changed

Lines changed: 265 additions & 117 deletions

include/sound/control.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct snd_kcontrol_new {
4242
snd_ctl_elem_iface_t iface; /* interface identifier */
4343
unsigned int device; /* device/client number */
4444
unsigned int subdevice; /* subdevice (substream) number */
45-
const unsigned char *name; /* ASCII name of item */
45+
const char *name; /* ASCII name of item */
4646
unsigned int index; /* index of item */
4747
unsigned int access; /* access rights */
4848
unsigned int count; /* count of same elements */

include/sound/core.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ void __snd_printk(unsigned int level, const char *file, int line,
332332
#define snd_BUG() WARN(1, "BUG?\n")
333333

334334
/**
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.
336337
*/
337338
#define snd_printd_ratelimit() printk_ratelimit()
338339

include/sound/pcm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,8 +1284,8 @@ snd_pcm_sgbuf_get_ptr(struct snd_pcm_substream *substream, unsigned int ofs)
12841284
}
12851285

12861286
/**
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
12891289
* @substream: PCM substream
12901290
* @ofs: byte offset
12911291
* @size: byte size to examine

include/uapi/sound/compress_offload.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ struct snd_compr_metadata {
144144
__u32 value[8];
145145
} __attribute__((packed, aligned(4)));
146146

147-
/**
147+
/*
148148
* compress path ioctl definitions
149149
* SNDRV_COMPRESS_GET_CAPS: Query capability of DSP
150150
* SNDRV_COMPRESS_GET_CODEC_CAPS: Query capability of a codec

sound/core/control.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,8 +1925,8 @@ EXPORT_SYMBOL(snd_ctl_unregister_ioctl);
19251925

19261926
#ifdef CONFIG_COMPAT
19271927
/**
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
19301930
* @fcn: ioctl callback function to unregister
19311931
*/
19321932
int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn)

sound/core/pcm_dmaengine.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream)
356356
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_close);
357357

358358
/**
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
360361
* @substream: PCM substream
361362
*
362363
* Releases the DMA channel associated with the PCM substream.

sound/core/pcm_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ void snd_pcm_set_ops(struct snd_pcm *pcm, int direction,
490490
EXPORT_SYMBOL(snd_pcm_set_ops);
491491

492492
/**
493-
* snd_pcm_sync - set the PCM sync id
493+
* snd_pcm_set_sync - set the PCM sync id
494494
* @substream: the pcm substream
495495
*
496496
* Sets the PCM sync identifier for the card.

sound/core/pcm_native.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void snd_pcm_stream_lock(struct snd_pcm_substream *substream)
112112
EXPORT_SYMBOL_GPL(snd_pcm_stream_lock);
113113

114114
/**
115-
* snd_pcm_stream_lock - Unlock the PCM stream
115+
* snd_pcm_stream_unlock - Unlock the PCM stream
116116
* @substream: PCM substream
117117
*
118118
* This unlocks the PCM stream that has been locked via snd_pcm_stream_lock().
@@ -595,7 +595,7 @@ static void snd_pcm_sync_stop(struct snd_pcm_substream *substream)
595595
}
596596

597597
/**
598-
* snd_pcm_hw_param_choose - choose a configuration defined by @params
598+
* snd_pcm_hw_params_choose - choose a configuration defined by @params
599599
* @pcm: PCM instance
600600
* @params: the hw_params instance
601601
*

sound/hda/ext/hdac_ext_controller.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ struct hdac_ext_link *snd_hdac_ext_bus_get_link(struct hdac_bus *bus,
148148
return NULL;
149149
if (bus->idx != bus_idx)
150150
return NULL;
151+
if (addr < 0 || addr > 31)
152+
return NULL;
151153

152154
list_for_each_entry(hlink, &bus->hlink_list, list) {
153155
for (i = 0; i < HDA_MAX_CODECS; i++) {

sound/pci/hda/hda_codec.c

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2934,7 +2934,7 @@ static void hda_call_codec_resume(struct hda_codec *codec)
29342934
snd_hdac_leave_pm(&codec->core);
29352935
}
29362936

2937-
static int hda_codec_runtime_suspend(struct device *dev)
2937+
static int hda_codec_suspend(struct device *dev)
29382938
{
29392939
struct hda_codec *codec = dev_to_hda_codec(dev);
29402940
unsigned int state;
@@ -2953,7 +2953,7 @@ static int hda_codec_runtime_suspend(struct device *dev)
29532953
return 0;
29542954
}
29552955

2956-
static int hda_codec_runtime_resume(struct device *dev)
2956+
static int hda_codec_resume(struct device *dev)
29572957
{
29582958
struct hda_codec *codec = dev_to_hda_codec(dev);
29592959

@@ -2967,57 +2967,70 @@ static int hda_codec_runtime_resume(struct device *dev)
29672967
pm_runtime_mark_last_busy(dev);
29682968
return 0;
29692969
}
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+
29702981
#endif /* CONFIG_PM */
29712982

29722983
#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)
29742990
{
29752991
struct hda_codec *codec = dev_to_hda_codec(dev);
2976-
int ret;
29772992

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);
29852996
}
29862997

29872998
static int hda_codec_pm_suspend(struct device *dev)
29882999
{
29893000
dev->power.power_state = PMSG_SUSPEND;
2990-
return pm_runtime_force_suspend(dev);
3001+
return hda_codec_suspend(dev);
29913002
}
29923003

29933004
static int hda_codec_pm_resume(struct device *dev)
29943005
{
29953006
dev->power.power_state = PMSG_RESUME;
2996-
return hda_codec_force_resume(dev);
3007+
return hda_codec_resume(dev);
29973008
}
29983009

29993010
static int hda_codec_pm_freeze(struct device *dev)
30003011
{
30013012
dev->power.power_state = PMSG_FREEZE;
3002-
return pm_runtime_force_suspend(dev);
3013+
return hda_codec_suspend(dev);
30033014
}
30043015

30053016
static int hda_codec_pm_thaw(struct device *dev)
30063017
{
30073018
dev->power.power_state = PMSG_THAW;
3008-
return hda_codec_force_resume(dev);
3019+
return hda_codec_resume(dev);
30093020
}
30103021

30113022
static int hda_codec_pm_restore(struct device *dev)
30123023
{
30133024
dev->power.power_state = PMSG_RESTORE;
3014-
return hda_codec_force_resume(dev);
3025+
return hda_codec_resume(dev);
30153026
}
30163027
#endif /* CONFIG_PM_SLEEP */
30173028

30183029
/* referred in hda_bind.c */
30193030
const struct dev_pm_ops hda_codec_driver_pm = {
30203031
#ifdef CONFIG_PM_SLEEP
3032+
.prepare = hda_codec_pm_prepare,
3033+
.complete = hda_codec_pm_complete,
30213034
.suspend = hda_codec_pm_suspend,
30223035
.resume = hda_codec_pm_resume,
30233036
.freeze = hda_codec_pm_freeze,

0 commit comments

Comments
 (0)