Skip to content

Commit

Permalink
Merge tag 'sound-6.1-rc7' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A few more last-minute fixes for 6.1 that have been gathered in the
  last week; nothing looks too worrisome, mostly device-specific small
  fixes, including the ABI fix for ASoC SOF"

* tag 'sound-6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: soc-pcm: Add NULL check in BE reparenting
  ALSA: seq: Fix function prototype mismatch in snd_seq_expand_var_event
  ASoC: SOF: dai: move AMD_HS to end of list to restore backwards-compatibility
  ASoC: max98373: Add checks for devm_kcalloc
  ASoC: rt711-sdca: fix the latency time of clock stop prepare state machine transitions
  ASoC: soc-pcm: Don't zero TDM masks in __soc_pcm_open()
  ASoC: sgtl5000: Reset the CHIP_CLK_CTRL reg on remove
  ASoC: hdac_hda: fix hda pcm buffer overflow issue
  ASoC: stm32: i2s: remove irqf_oneshot flag
  ASoC: wm8962: Wait for updated value of WM8962_CLOCKING1 register
  • Loading branch information
torvalds committed Nov 25, 2022
2 parents 6fe0e07 + ecae4c8 commit ca66e58
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 14 deletions.
2 changes: 1 addition & 1 deletion include/sound/sof/dai.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ enum sof_ipc_dai_type {
SOF_DAI_AMD_BT, /**< AMD ACP BT*/
SOF_DAI_AMD_SP, /**< AMD ACP SP */
SOF_DAI_AMD_DMIC, /**< AMD ACP DMIC */
SOF_DAI_AMD_HS, /**< Amd HS */
SOF_DAI_MEDIATEK_AFE, /**< Mediatek AFE */
SOF_DAI_AMD_HS, /**< Amd HS */
};

/* general purpose DAI configuration */
Expand Down
11 changes: 7 additions & 4 deletions sound/core/seq/seq_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,19 @@ EXPORT_SYMBOL(snd_seq_dump_var_event);
* expand the variable length event to linear buffer space.
*/

static int seq_copy_in_kernel(char **bufptr, const void *src, int size)
static int seq_copy_in_kernel(void *ptr, void *src, int size)
{
char **bufptr = ptr;

memcpy(*bufptr, src, size);
*bufptr += size;
return 0;
}

static int seq_copy_in_user(char __user **bufptr, const void *src, int size)
static int seq_copy_in_user(void *ptr, void *src, int size)
{
char __user **bufptr = ptr;

if (copy_to_user(*bufptr, src, size))
return -EFAULT;
*bufptr += size;
Expand Down Expand Up @@ -151,8 +155,7 @@ int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char
return newlen;
}
err = snd_seq_dump_var_event(event,
in_kernel ? (snd_seq_dump_func_t)seq_copy_in_kernel :
(snd_seq_dump_func_t)seq_copy_in_user,
in_kernel ? seq_copy_in_kernel : seq_copy_in_user,
&buf);
return err < 0 ? err : newlen;
}
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/hdac_hda.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ enum {
HDAC_HDMI_1_DAI_ID,
HDAC_HDMI_2_DAI_ID,
HDAC_HDMI_3_DAI_ID,
HDAC_LAST_DAI_ID = HDAC_HDMI_3_DAI_ID,
HDAC_DAI_ID_NUM
};

struct hdac_hda_pcm {
Expand All @@ -24,7 +24,7 @@ struct hdac_hda_pcm {

struct hdac_hda_priv {
struct hda_codec *codec;
struct hdac_hda_pcm pcm[HDAC_LAST_DAI_ID];
struct hdac_hda_pcm pcm[HDAC_DAI_ID_NUM];
bool need_display_power;
};

Expand Down
4 changes: 4 additions & 0 deletions sound/soc/codecs/max98373-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@ static int max98373_i2c_probe(struct i2c_client *i2c)
max98373->cache = devm_kcalloc(&i2c->dev, max98373->cache_num,
sizeof(*max98373->cache),
GFP_KERNEL);
if (!max98373->cache) {
ret = -ENOMEM;
return ret;
}

for (i = 0; i < max98373->cache_num; i++)
max98373->cache[i].reg = max98373_i2c_cache_reg[i];
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/rt711-sdca-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static int rt711_sdca_read_prop(struct sdw_slave *slave)
}

/* set the timeout values */
prop->clk_stop_timeout = 20;
prop->clk_stop_timeout = 700;

/* wake-up event */
prop->wake_capable = 1;
Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/sgtl5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,7 @@ static void sgtl5000_i2c_remove(struct i2c_client *client)
{
struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client);

regmap_write(sgtl5000->regmap, SGTL5000_CHIP_CLK_CTRL, SGTL5000_CHIP_CLK_CTRL_DEFAULT);
regmap_write(sgtl5000->regmap, SGTL5000_CHIP_DIG_POWER, SGTL5000_DIG_POWER_DEFAULT);
regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, SGTL5000_ANA_POWER_DEFAULT);

Expand Down
8 changes: 8 additions & 0 deletions sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
Expand Up @@ -2503,6 +2503,14 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
snd_soc_component_update_bits(component, WM8962_CLOCKING2,
WM8962_SYSCLK_ENA_MASK, WM8962_SYSCLK_ENA);

/* DSPCLK_DIV field in WM8962_CLOCKING1 register is used to generate
* correct frequency of LRCLK and BCLK. Sometimes the read-only value
* can't be updated timely after enabling SYSCLK. This results in wrong
* calculation values. Delay is introduced here to wait for newest
* value from register. The time of the delay should be at least
* 500~1000us according to test.
*/
usleep_range(500, 1000);
dspclk = snd_soc_component_read(component, WM8962_CLOCKING1);

if (snd_soc_component_get_bias_level(component) != SND_SOC_BIAS_ON)
Expand Down
7 changes: 2 additions & 5 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,11 +822,6 @@ static int __soc_pcm_open(struct snd_soc_pcm_runtime *rtd,
ret = snd_soc_dai_startup(dai, substream);
if (ret < 0)
goto err;

if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
dai->tx_mask = 0;
else
dai->rx_mask = 0;
}

/* Dynamic PCM DAI links compat checks use dynamic capabilities */
Expand Down Expand Up @@ -1252,6 +1247,8 @@ static void dpcm_be_reparent(struct snd_soc_pcm_runtime *fe,
return;

be_substream = snd_soc_dpcm_get_substream(be, stream);
if (!be_substream)
return;

for_each_dpcm_fe(be, stream, dpcm) {
if (dpcm->fe == fe)
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/stm/stm32_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev,
if (irq < 0)
return irq;

ret = devm_request_irq(&pdev->dev, irq, stm32_i2s_isr, IRQF_ONESHOT,
ret = devm_request_irq(&pdev->dev, irq, stm32_i2s_isr, 0,
dev_name(&pdev->dev), i2s);
if (ret) {
dev_err(&pdev->dev, "irq request returned %d\n", ret);
Expand Down

0 comments on commit ca66e58

Please sign in to comment.