sound fixes for 4.7-rc7
Subsystems (7)
Linus,
please pull sound fixes for v4.7-rc7 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-4.7-rc7
The topmost commit is 9cd25743765cfe851aed8d655a62d60156aed293
----------------------------------------------------------------
sound fixes for 4.7-rc7
Here are a collection of small fixes: at this time, we've got a slightly high amount, but all small and trivial fixes, and nothing scary can be seen there.
----------------------------------------------------------------
Ajit Pandey (1):
ASoC: wm5110: Add missing route from OUT3R to SYSCLK
Alan Cox (1):
ASoC: Intel: atom: fix missing breaks that would cause the wrong operation to execute
Alexander Shiyan (1):
ASoC: fsl_ssi: Fix number of words per frame for I2S-slave mode
Arnd Bergmann (1):
ASoC: hdmi-codec: select CONFIG_HDMI
Bard Liao (2):
ASoC: rt5670: fix HP Playback Volume control
ASoC: rt5645: fix reg-2f default value.
Bob Copeland (1):
ALSA: hda - fix read before array start
Charles Keepax (1):
ASoC: wm5102: Correct supported channels on trace compressed DAI
Christophe JAILLET (1):
ALSA: echoaudio: Fix memory allocation
Fabio Estevam (1):
ASoC: ak4613: Remove owner assignment from platform_driver
Geert Uytterhoeven (2):
ASoC: wm8940: Enable cache usage to fix crashes on resume
ASoC: ak4613: Enable cache usage to fix crashes on resume
Janusz Krzysztofik (1):
ASoC: cx20442: set tty->receiver_room in v253_open
Kuninori Morimoto (1):
ASoC: rsnd: open 31bit of SSICKR mask
Peter Ujfalusi (1):
ASoC: davinci-mcasp: Fix dra7 DMA offset when using CFG port
Takashi Iwai (2):
ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift()
ALSA: timer: Fix negative queue usage by racy accesses
Torsten Hilbrich (1):
ALSA: hda/realtek: Add Lenovo L460 to docking unit fixup
Vinod Koul (3):
ASoC: hdac_hdmi: Fix potential NULL dereference
ASoC: Intel: Skylake: Initialize module list for Broxton
ALSA: hda - Add PCI ID for Kabylake-H
--- sound/core/timer.c | 2 +- sound/pci/au88x0/au88x0_core.c | 5 +- sound/pci/echoaudio/echoaudio.c | 4 +- sound/pci/hda/hda_generic.c | 2 + sound/pci/hda/hda_intel.c | 6 ++- sound/pci/hda/patch_realtek.c | 1 + sound/soc/codecs/Kconfig | 7 +-- sound/soc/codecs/ak4613.c | 2 +- sound/soc/codecs/cx20442.c | 1 + sound/soc/codecs/hdac_hdmi.c | 20 ++++++++ sound/soc/codecs/rt5645.c | 2 +- sound/soc/codecs/rt5670.c | 2 +- sound/soc/codecs/wm5102.c | 2 +- sound/soc/codecs/wm5110.c | 1 + sound/soc/codecs/wm8940.c | 1 + sound/soc/davinci/davinci-mcasp.c | 56 +++++++++++++++++++++-- sound/soc/davinci/davinci-mcasp.h | 4 +- sound/soc/fsl/fsl_ssi.c | 12 ++--- sound/soc/intel/atom/sst-mfld-platform-compress.c | 9 +++- sound/soc/intel/skylake/bxt-sst.c | 1 + sound/soc/sh/rcar/adg.c | 2 +- 21 files changed, 113 insertions(+), 29 deletions(-)
sound/core/timer.c +1 -1
@@ -1955,6 +1955,7 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer, qhead = tu->qhead++; tu->qhead %= tu->queue_size; + tu->qused--;spin_unlock_irq (&tu->qlock);if (tu->tread) {
@@ -1968,7 +1969,6 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer, }spin_lock_irq (&tu->qlock); - tu->qused--;if (err <0 ) goto _error; result += unit;
sound/pci/au88x0/au88x0_core.c +2 -3
@@ -1444,9 +1444,8 @@ static int vortex_wtdma_bufshift(vortex_t * vortex, int wtdma)int page, p, pp, delta, i; page = - (hwread (vortex->mmio,VORTEX_WTDMA_STAT + (wtdma <<2 )) & -WT_SUBBUF_MASK ) - >>WT_SUBBUF_SHIFT ; + (hwread (vortex->mmio,VORTEX_WTDMA_STAT + (wtdma <<2 )) + >>WT_SUBBUF_SHIFT ) &WT_SUBBUF_MASK ;if (dma->nr_periods >=4 ) delta = (page - dma->period_real) &3 ;else {
sound/pci/echoaudio/echoaudio.c +2 -2
@@ -2200,11 +2200,11 @@ static int snd_echo_resume(struct device *dev)u32 pipe_alloc_mask;int err; - commpage_bak =kmalloc (sizeof (struct echoaudio ),GFP_KERNEL ); + commpage_bak =kmalloc (sizeof (*commpage),GFP_KERNEL );if (commpage_bak ==NULL )return -ENOMEM ; commpage = chip->comm_page; -memcpy (commpage_bak, commpage,sizeof (struct comm_page )); +memcpy (commpage_bak, commpage,sizeof (*commpage)); err =init_hw (chip, chip->pci->device, chip->pci->subsystem_device);if (err <0 ) {
sound/pci/hda/hda_generic.c +2 -0
@@ -3977,6 +3977,8 @@ static hda_nid_t set_path_power(struct hda_codec *codec, hda_nid_t nid,for (n =0 ; n < spec->paths.used; n++) { path =snd_array_elem (&spec->paths, n); +if (!path->depth) +continue ;if (path->path[0 ] == nid || path->path[path->depth -1 ] == nid) {bool pin_old = path->pin_enabled;
sound/pci/hda/hda_intel.c +5 -1
@@ -367,9 +367,10 @@ enum {#define IS_SKL_LP (pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70)#define IS_KBL (pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa171)#define IS_KBL_LP (pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d71) +#define IS_KBL_H (pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa2f0)#define IS_BXT (pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)#define IS_SKL_PLUS (pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) || \ - IS_KBL(pci) || IS_KBL_LP(pci) + IS_KBL(pci) || IS_KBL_LP(pci) || IS_KBL_H(pci)static char *driver_short_names[] = { [AZX_DRIVER_ICH ] ="HDA Intel" ,
@@ -2190,6 +2191,9 @@ static const struct pci_device_id azx_ids[] = {/* Kabylake-LP */ { PCI_DEVICE(0x8086, 0x9d71), .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, + /* Kabylake-H */ + { PCI_DEVICE(0x8086, 0xa2f0), + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, /* Broxton-P(Apollolake) */ { PCI_DEVICE(0x8086, 0x5a98), .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON },
sound/pci/hda/patch_realtek.c +1 -0
@@ -5651,6 +5651,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x504a ,"ThinkPad X260" ,ALC292_FIXUP_TPT440_DOCK ),SND_PCI_QUIRK (0x17aa ,0x504b ,"Thinkpad" ,ALC293_FIXUP_LENOVO_SPK_NOISE ),SND_PCI_QUIRK (0x17aa ,0x5050 ,"Thinkpad T560p" ,ALC292_FIXUP_TPT460 ), +SND_PCI_QUIRK (0x17aa ,0x5051 ,"Thinkpad L460" ,ALC292_FIXUP_TPT460 ),SND_PCI_QUIRK (0x17aa ,0x5053 ,"Thinkpad T460" ,ALC292_FIXUP_TPT460 ),SND_PCI_QUIRK (0x17aa ,0x5109 ,"Thinkpad" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ), SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
sound/soc/codecs/Kconfig +4 -3
@@ -483,9 +483,10 @@ config SND_SOC_DMIC tristate config SND_SOC_HDMI_CODEC - tristate - select SND_PCM_ELD - select SND_PCM_IEC958 + tristate + select SND_PCM_ELD + select SND_PCM_IEC958 + select HDMI config SND_SOC_ES8328 tristate "Everest Semi ES8328 CODEC"
sound/soc/codecs/ak4613.c +1 -1
@@ -146,6 +146,7 @@ static const struct regmap_config ak4613_regmap_cfg = { .max_register = 0x16, .reg_defaults = ak4613_reg, .num_reg_defaults = ARRAY_SIZE(ak4613_reg), + .cache_type = REGCACHE_RBTREE, };static const struct of_device_id ak4613_of_match[] = {
@@ -530,7 +531,6 @@ static int ak4613_i2c_remove(struct i2c_client *client)static struct i2c_driver ak4613_i2c_driver = { .driver = { .name ="ak4613-codec" , - .owner =THIS_MODULE , .of_match_table = ak4613_of_match, }, .probe = ak4613_i2c_probe,
sound/soc/codecs/cx20442.c +1 -0
@@ -226,6 +226,7 @@ static int v253_open(struct tty_struct *tty)if (!tty->disc_data)return -ENODEV ; + tty->receive_room =16 ;if (tty->ops->write (tty, v253_init, len) != len) { ret = -EIO ; goto err;
sound/soc/codecs/hdac_hdmi.c +20 -0
@@ -1474,6 +1474,11 @@ static int hdmi_codec_probe(struct snd_soc_codec *codec)* exit, we call pm_runtime_suspend() so that will do for us */ hlink =snd_hdac_ext_bus_get_link (edev->ebus,dev_name (&edev->hdac.dev)); +if (!hlink) { +dev_err (&edev->hdac.dev,"hdac link not found\n" ); +return -EIO ; + } +snd_hdac_ext_bus_link_get (edev->ebus, hlink); ret =create_fill_widget_route_map (dapm);
@@ -1634,6 +1639,11 @@ static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev)/* hold the ref while we probe */ hlink =snd_hdac_ext_bus_get_link (edev->ebus,dev_name (&edev->hdac.dev)); +if (!hlink) { +dev_err (&edev->hdac.dev,"hdac link not found\n" ); +return -EIO ; + } +snd_hdac_ext_bus_link_get (edev->ebus, hlink); hdmi_priv =devm_kzalloc (&codec->dev,sizeof (*hdmi_priv),GFP_KERNEL );
@@ -1744,6 +1754,11 @@ static int hdac_hdmi_runtime_suspend(struct device *dev) } hlink =snd_hdac_ext_bus_get_link (ebus,dev_name (dev)); +if (!hlink) { +dev_err (dev,"hdac link not found\n" ); +return -EIO ; + } +snd_hdac_ext_bus_link_put (ebus, hlink);return 0 ;
@@ -1765,6 +1780,11 @@ static int hdac_hdmi_runtime_resume(struct device *dev)return 0 ; hlink =snd_hdac_ext_bus_get_link (ebus,dev_name (dev)); +if (!hlink) { +dev_err (dev,"hdac link not found\n" ); +return -EIO ; + } +snd_hdac_ext_bus_link_get (ebus, hlink); err =snd_hdac_display_power (bus, true);
sound/soc/codecs/rt5645.c +1 -1
@@ -253,7 +253,7 @@ static const struct reg_default rt5650_reg[] = { { 0x2b, 0x5454 }, { 0x2c, 0xaaa0 }, { 0x2d, 0x0000 }, - { 0x2f, 0x1002 }, + { 0x2f, 0x5002 }, { 0x31, 0x5000 }, { 0x32, 0x0000 }, { 0x33, 0x0000 },
sound/soc/codecs/rt5670.c +1 -1
@@ -619,7 +619,7 @@ static const struct snd_kcontrol_new rt5670_snd_controls[] = { RT5670_L_MUTE_SFT, RT5670_R_MUTE_SFT, 1, 1),SOC_DOUBLE_TLV ("HP Playback Volume" ,RT5670_HP_VOL ,RT5670_L_VOL_SFT ,RT5670_R_VOL_SFT , -39 ,0 , out_vol_tlv), +39 ,1 , out_vol_tlv),/* OUTPUT Control */ SOC_DOUBLE ("OUT Channel Switch" ,RT5670_LOUT1 , RT5670_VOL_L_SFT, RT5670_VOL_R_SFT, 1, 1),
sound/soc/codecs/wm5102.c +1 -1
@@ -1872,7 +1872,7 @@ static struct snd_soc_dai_driver wm5102_dai[] = { .capture = { .stream_name = "Audio Trace CPU", .channels_min = 1, - .channels_max = 6, + .channels_max = 4, .rates = WM5102_RATES, .formats = WM5102_FORMATS, },
sound/soc/codecs/wm5110.c +1 -0
@@ -1723,6 +1723,7 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = { { "OUT2L", NULL, "SYSCLK" }, { "OUT2R", NULL, "SYSCLK" }, { "OUT3L", NULL, "SYSCLK" }, + { "OUT3R", NULL, "SYSCLK" }, { "OUT4L", NULL, "SYSCLK" }, { "OUT4R", NULL, "SYSCLK" }, { "OUT5L", NULL, "SYSCLK" },
sound/soc/codecs/wm8940.c +1 -0
@@ -743,6 +743,7 @@ static const struct regmap_config wm8940_regmap = { .max_register = WM8940_MONOMIX, .reg_defaults = wm8940_reg_defaults, .num_reg_defaults = ARRAY_SIZE(wm8940_reg_defaults), + .cache_type = REGCACHE_RBTREE, .readable_reg = wm8940_readable_register, .volatile_reg = wm8940_volatile_register,
sound/soc/davinci/davinci-mcasp.c +52 -4
80 lines not on this page · raw message
sound/soc/davinci/davinci-mcasp.h +2 -2
@@ -85,9 +85,9 @@ (n << 2))/* Transmit Buffer for Serializer n */ -#define DAVINCI_MCASP_TXBUF_REG 0x200 +#define DAVINCI_MCASP_TXBUF_REG (n) (0x200 + (n << 2))/* Receive Buffer for Serializer n */ -#define DAVINCI_MCASP_RXBUF_REG 0x280 +#define DAVINCI_MCASP_RXBUF_REG (n) (0x280 + (n << 2))/* McASP FIFO Registers */ #define DAVINCI_MCASP_V2_AFIFO_BASE (0x1010)
sound/soc/fsl/fsl_ssi.c +6 -6
@@ -952,16 +952,16 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev, ssi_private->i2s_mode =CCSR_SSI_SCR_NET ;switch (fmt &SND_SOC_DAIFMT_FORMAT_MASK ) {case SND_SOC_DAIFMT_I2S : +regmap_update_bits (regs,CCSR_SSI_STCCR , + CCSR_SSI_SxCCR_DC_MASK, +CCSR_SSI_SxCCR_DC (2 )); +regmap_update_bits (regs,CCSR_SSI_SRCCR , + CCSR_SSI_SxCCR_DC_MASK, +CCSR_SSI_SxCCR_DC (2 ));switch (fmt &SND_SOC_DAIFMT_MASTER_MASK ) {case SND_SOC_DAIFMT_CBM_CFS :case SND_SOC_DAIFMT_CBS_CFS : ssi_private->i2s_mode |=CCSR_SSI_SCR_I2S_MODE_MASTER ; -regmap_update_bits (regs,CCSR_SSI_STCCR , - CCSR_SSI_SxCCR_DC_MASK, -CCSR_SSI_SxCCR_DC (2 )); -regmap_update_bits (regs,CCSR_SSI_SRCCR , - CCSR_SSI_SxCCR_DC_MASK, -CCSR_SSI_SxCCR_DC (2 ));break ;case SND_SOC_DAIFMT_CBM_CFM : ssi_private->i2s_mode |=CCSR_SSI_SCR_I2S_MODE_SLAVE ;
sound/soc/intel/atom/sst-mfld-platform-compress.c +7 -2
@@ -182,24 +182,29 @@ static int sst_platform_compr_trigger(struct snd_compr_stream *cstream, int cmd)case SNDRV_PCM_TRIGGER_START :if (stream->compr_ops->stream_start)return stream->compr_ops->stream_start (sst->dev, stream->id); +break ;case SNDRV_PCM_TRIGGER_STOP :if (stream->compr_ops->stream_drop)return stream->compr_ops->stream_drop (sst->dev, stream->id); +break ;case SND_COMPR_TRIGGER_DRAIN :if (stream->compr_ops->stream_drain)return stream->compr_ops->stream_drain (sst->dev, stream->id); +break ;case SND_COMPR_TRIGGER_PARTIAL_DRAIN :if (stream->compr_ops->stream_partial_drain)return stream->compr_ops->stream_partial_drain (sst->dev, stream->id); +break ;case SNDRV_PCM_TRIGGER_PAUSE_PUSH :if (stream->compr_ops->stream_pause)return stream->compr_ops->stream_pause (sst->dev, stream->id); +break ;case SNDRV_PCM_TRIGGER_PAUSE_RELEASE :if (stream->compr_ops->stream_pause_release)return stream->compr_ops->stream_pause_release (sst->dev, stream->id); -default : -return -EINVAL ; +break ; } +return -EINVAL ; } static int sst_platform_compr_pointer(struct snd_compr_stream *cstream,
sound/soc/intel/skylake/bxt-sst.c +1 -0
@@ -291,6 +291,7 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,sst_dsp_mailbox_init (sst, (BXT_ADSP_SRAM0_BASE +SKL_ADSP_W0_STAT_SZ ),SKL_ADSP_W0_UP_SZ ,BXT_ADSP_SRAM1_BASE ,SKL_ADSP_W1_SZ ); +INIT_LIST_HEAD (&sst->module_list); ret =skl_ipc_init (dev, skl);if (ret)return ret;
sound/soc/sh/rcar/adg.c +1 -1
@@ -518,7 +518,7 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv, } } -rsnd_mod_bset (adg_mod,SSICKR ,0x00FF0000 , ckr); +rsnd_mod_bset (adg_mod,SSICKR ,0x80FF0000 , ckr);rsnd_mod_write (adg_mod,BRRA , rbga);rsnd_mod_write (adg_mod,BRRB , rbgb);