diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-07 01:10:46 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-07 01:10:46 +0300 |
commit | da2577fe63f865cd9dc785a42c29c0071f567a35 (patch) | |
tree | f06167a62e8881e21f368fd02e0645bf508ab442 /sound/isa | |
parent | 542d0e583b7b366527175b2b5fc0aad262fa33b0 (diff) | |
parent | a634090a0f242caa8ebc91967b118995a80eb13b (diff) | |
download | linux-da2577fe63f865cd9dc785a42c29c0071f567a35.tar.xz |
Merge tag 'sound-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"We had again a busy development cycle with many new drivers as well as
lots of core improvements / cleanups. Let's go for highlights:
ALSA core:
- PCM locking scheme was refactored for reducing a global rwlock
- PCM suspend is handled in the device type PM ops now; lots of
explicit calls were reduced by this action
- Cleanups about PCM buffer preallocation calls
- Kill NULL device object in memory allocations
- Lots of procfs API cleanups
ASoC core:
- Support for only powering up channels that are actively being used
- Cleanups / fixes of topology API
ASoC drivers:
- MediaTek BTCVSD for a Bluetooth radio chip, which is the first such
driver we've had upstream!
- Quite a few improvements to simplify the generic card drivers,
especially the merge of the SCU cards into the main generic drivers
- Lots of fixes for probing on Intel systems to follow more standard
styles
- A big refresh and cleanup of the Samsung drivers
- New drivers: Asahi Kasei Microdevices AK4497, Cirrus Logic CS4341
and CS35L26, Google ChromeOS embedded controllers, Ingenic JZ4725B,
MediaTek BTCVSD, MT8183 and MT6358, NXP MICFIL, Rockchip RK3328,
Spreadtrum DMA controllers, Qualcomm WCD9335, Xilinx S/PDIF and PCM
formatters
ALSA drivers:
- Improvements of Tegra HD-audio controller driver for supporting new
chips
- HD-audio codec quirks for ALC294 S4 resume, ASUS laptop, Chrome
headset button support and Dell workstations
- Improved DSD support on USB-audio
- Quirk for MOTU MicroBook II USB-audio
- Support for Fireface UCX support and Solid State Logic Duende
Classic/Mini"
* tag 'sound-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (461 commits)
ALSA: usb-audio: Add quirk for MOTU MicroBook II
ASoC: stm32: i2s: skip useless write in slave mode
ASoC: stm32: i2s: fix race condition in irq handler
ASoC: stm32: i2s: remove useless callback
ASoC: stm32: i2s: fix dma configuration
ASoC: stm32: i2s: fix stream count management
ASoC: stm32: i2s: fix 16 bit format support
ASoC: stm32: i2s: fix IRQ clearing
ASoC: qcom: Kconfig: fix dependency for sdm845
ASoC: Intel: Boards: Add Maxim98373 support
ASoC: rsnd: gen: fix SSI9 4/5/6/7 busif related register address
ALSA: firewire-motu: fix construction of PCM frame for capture direction
ALSA: bebob: use more identical mod_alias for Saffire Pro 10 I/O against Liquid Saffire 56
ALSA: hda: Extend i915 component bind timeout
ASoC: wm_adsp: Improve logging messages
ASoC: wm_adsp: Add support for multiple compressed buffers
ASoC: wm_adsp: Refactor compress stream initialisation
ASoC: wm_adsp: Reorder some functions for improved clarity
ASoC: wm_adsp: Factor out stripping padding from ADSP data
ASoC: cs35l36: Fix an IS_ERR() vs NULL checking bug
...
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/ad1816a/ad1816a_lib.c | 3 | ||||
-rw-r--r-- | sound/isa/als100.c | 1 | ||||
-rw-r--r-- | sound/isa/cmi8328.c | 1 | ||||
-rw-r--r-- | sound/isa/cmi8330.c | 3 | ||||
-rw-r--r-- | sound/isa/es1688/es1688.c | 2 | ||||
-rw-r--r-- | sound/isa/es1688/es1688_lib.c | 6 | ||||
-rw-r--r-- | sound/isa/es18xx.c | 4 | ||||
-rw-r--r-- | sound/isa/gus/gus_irq.c | 5 | ||||
-rw-r--r-- | sound/isa/gus/gus_main.c | 13 | ||||
-rw-r--r-- | sound/isa/gus/gus_mem.c | 6 | ||||
-rw-r--r-- | sound/isa/gus/gus_pcm.c | 4 | ||||
-rw-r--r-- | sound/isa/opti9xx/miro.c | 5 | ||||
-rw-r--r-- | sound/isa/sb/jazz16.c | 1 | ||||
-rw-r--r-- | sound/isa/sb/sb16.c | 1 | ||||
-rw-r--r-- | sound/isa/sb/sb16_csp.c | 5 | ||||
-rw-r--r-- | sound/isa/sb/sb16_main.c | 12 | ||||
-rw-r--r-- | sound/isa/sb/sb8.c | 1 | ||||
-rw-r--r-- | sound/isa/sb/sb8_main.c | 2 | ||||
-rw-r--r-- | sound/isa/sscape.c | 7 | ||||
-rw-r--r-- | sound/isa/wss/wss_lib.c | 3 |
20 files changed, 37 insertions, 48 deletions
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c index fba6d22f7f4b..94b381a78e9e 100644 --- a/sound/isa/ad1816a/ad1816a_lib.c +++ b/sound/isa/ad1816a/ad1816a_lib.c @@ -518,7 +518,6 @@ void snd_ad1816a_suspend(struct snd_ad1816a *chip) int reg; unsigned long flags; - snd_pcm_suspend_all(chip->pcm); spin_lock_irqsave(&chip->lock, flags); for (reg = 0; reg < 48; reg++) chip->image[reg] = snd_ad1816a_read(chip, reg); @@ -694,7 +693,7 @@ int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device) snd_ad1816a_init(chip); snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_isa_data(), + chip->card->dev, 64*1024, chip->dma1 > 3 || chip->dma2 > 3 ? 128*1024 : 64*1024); chip->pcm = pcm; diff --git a/sound/isa/als100.c b/sound/isa/als100.c index f63142ec287e..571108021e9d 100644 --- a/sound/isa/als100.c +++ b/sound/isa/als100.c @@ -322,7 +322,6 @@ static int snd_als100_pnp_suspend(struct pnp_card_link *pcard, pm_message_t stat struct snd_sb *chip = acard->chip; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - snd_pcm_suspend_all(chip->pcm); snd_sbmixer_suspend(chip); return 0; } diff --git a/sound/isa/cmi8328.c b/sound/isa/cmi8328.c index de6ef1b1cf0e..617977516201 100644 --- a/sound/isa/cmi8328.c +++ b/sound/isa/cmi8328.c @@ -434,7 +434,6 @@ static int snd_cmi8328_suspend(struct device *pdev, unsigned int n, cmi = card->private_data; snd_cmi8328_cfg_save(cmi->port, cmi->cfg); snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - snd_pcm_suspend_all(cmi->wss->pcm); cmi->wss->suspend(cmi->wss); return 0; diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index 6b8c46942efb..1868b73aa49c 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c @@ -470,7 +470,7 @@ static int snd_cmi8330_pcm(struct snd_card *card, struct snd_cmi8330 *chip) snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &chip->streams[SNDRV_PCM_STREAM_CAPTURE].ops); snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_isa_data(), + card->dev, 64*1024, 128*1024); chip->pcm = pcm; @@ -484,7 +484,6 @@ static int snd_cmi8330_suspend(struct snd_card *card) struct snd_cmi8330 *acard = card->private_data; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - snd_pcm_suspend_all(acard->pcm); acard->wss->suspend(acard->wss); snd_sbmixer_suspend(acard->sb); return 0; diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index 3dfe7e592c25..87527627e059 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c @@ -301,10 +301,8 @@ static int snd_es968_pnp_suspend(struct pnp_card_link *pcard, pm_message_t state) { struct snd_card *card = pnp_get_card_drvdata(pcard); - struct snd_es1688 *chip = card->private_data; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - snd_pcm_suspend_all(chip->pcm); return 0; } diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c index 50cdce0e8946..1d9556c045e9 100644 --- a/sound/isa/es1688/es1688_lib.c +++ b/sound/isa/es1688/es1688_lib.c @@ -121,7 +121,7 @@ EXPORT_SYMBOL(snd_es1688_reset); static int snd_es1688_probe(struct snd_es1688 *chip) { unsigned long flags; - unsigned short major, minor, hw; + unsigned short major, minor; int i; /* @@ -166,14 +166,12 @@ static int snd_es1688_probe(struct snd_es1688 *chip) if (!chip->version) return -ENODEV; /* probably SB */ - hw = ES1688_HW_AUTO; switch (chip->version & 0xfff0) { case 0x4880: snd_printk(KERN_ERR "[0x%lx] ESS: AudioDrive ES488 detected, " "but driver is in another place\n", chip->port); return -ENODEV; case 0x6880: - hw = (chip->version & 0x0f) >= 8 ? ES1688_HW_1688 : ES1688_HW_688; break; default: snd_printk(KERN_ERR "[0x%lx] ESS: unknown AudioDrive chip " @@ -746,7 +744,7 @@ int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip, int device) chip->pcm = pcm; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_isa_data(), + card->dev, 64*1024, 64*1024); return 0; } diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 0d103d6f805e..07abc7f7840c 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -1717,7 +1717,7 @@ static int snd_es18xx_pcm(struct snd_card *card, int device) chip->pcm = pcm; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_isa_data(), + card->dev, 64*1024, chip->dma1 > 3 || chip->dma2 > 3 ? 128*1024 : 64*1024); return 0; @@ -1731,8 +1731,6 @@ static int snd_es18xx_suspend(struct snd_card *card, pm_message_t state) snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - snd_pcm_suspend_all(chip->pcm); - /* power down */ chip->pm_reg = (unsigned char)snd_es18xx_read(chip, ES18XX_PM); chip->pm_reg |= (ES18XX_PM_FM | ES18XX_PM_SUS); diff --git a/sound/isa/gus/gus_irq.c b/sound/isa/gus/gus_irq.c index 2055aff71b50..0ca6c38e2ed9 100644 --- a/sound/isa/gus/gus_irq.c +++ b/sound/isa/gus/gus_irq.c @@ -140,10 +140,7 @@ static void snd_gus_irq_info_read(struct snd_info_entry *entry, void snd_gus_irq_profile_init(struct snd_gus_card *gus) { - struct snd_info_entry *entry; - - if (! snd_card_proc_new(gus->card, "gusirq", &entry)) - snd_info_set_text_ops(entry, gus, snd_gus_irq_info_read); + snd_card_ro_proc_new(gus->card, "gusirq", gus, snd_gus_irq_info_read); } #endif diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index 3b8a0c880db5..33c8b66d5c8a 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c @@ -92,8 +92,17 @@ static const struct snd_kcontrol_new snd_gus_joystick_control = { static void snd_gus_init_control(struct snd_gus_card *gus) { - if (!gus->ace_flag) - snd_ctl_add(gus->card, snd_ctl_new1(&snd_gus_joystick_control, gus)); + int ret; + + if (!gus->ace_flag) { + ret = + snd_ctl_add(gus->card, + snd_ctl_new1(&snd_gus_joystick_control, + gus)); + if (ret) + snd_printk(KERN_ERR "gus: snd_ctl_add failed: %d\n", + ret); + } } /* diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index af888a022fc0..4ac76f46dd76 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c @@ -238,9 +238,6 @@ int snd_gf1_mem_init(struct snd_gus_card * gus) { struct snd_gf1_mem *alloc; struct snd_gf1_mem_block block; -#ifdef CONFIG_SND_DEBUG - struct snd_info_entry *entry; -#endif alloc = &gus->gf1.mem_alloc; mutex_init(&alloc->memory_mutex); @@ -263,8 +260,7 @@ int snd_gf1_mem_init(struct snd_gus_card * gus) if (snd_gf1_mem_xalloc(alloc, &block) == NULL) return -ENOMEM; #ifdef CONFIG_SND_DEBUG - if (! snd_card_proc_new(gus->card, "gusmem", &entry)) - snd_info_set_text_ops(entry, gus, snd_gf1_mem_info_read); + snd_card_ro_proc_new(gus->card, "gusmem", gus, snd_gf1_mem_info_read); #endif return 0; } diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index 131b28997e1d..b9efc6dff45d 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c @@ -891,7 +891,7 @@ int snd_gf1_pcm_new(struct snd_gus_card *gus, int pcm_dev, int control_index) for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV, - snd_dma_isa_data(), + card->dev, 64*1024, gus->gf1.dma1 > 3 ? 128*1024 : 64*1024); pcm->info_flags = 0; @@ -901,7 +901,7 @@ int snd_gf1_pcm_new(struct snd_gus_card *gus, int pcm_dev, int control_index) if (gus->gf1.dma2 == gus->gf1.dma1) pcm->info_flags |= SNDRV_PCM_INFO_HALF_DUPLEX; snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream, - SNDRV_DMA_TYPE_DEV, snd_dma_isa_data(), + SNDRV_DMA_TYPE_DEV, card->dev, 64*1024, gus->gf1.dma2 > 3 ? 128*1024 : 64*1024); } strcpy(pcm->name, pcm->id); diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index c6136c6b0214..997cdfd7b1ea 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c @@ -997,10 +997,7 @@ static void snd_miro_proc_read(struct snd_info_entry * entry, static void snd_miro_proc_init(struct snd_card *card, struct snd_miro *miro) { - struct snd_info_entry *entry; - - if (!snd_card_proc_new(card, "miro", &entry)) - snd_info_set_text_ops(entry, miro, snd_miro_proc_read); + snd_card_ro_proc_new(card, "miro", miro, snd_miro_proc_read); } /* diff --git a/sound/isa/sb/jazz16.c b/sound/isa/sb/jazz16.c index bfa0055e1fd6..7a313ff589c7 100644 --- a/sound/isa/sb/jazz16.c +++ b/sound/isa/sb/jazz16.c @@ -356,7 +356,6 @@ static int snd_jazz16_suspend(struct device *pdev, unsigned int n, struct snd_sb *chip = acard->chip; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - snd_pcm_suspend_all(chip->pcm); snd_sbmixer_suspend(chip); return 0; } diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c index 8f9ebeb998f6..3844d4c02f49 100644 --- a/sound/isa/sb/sb16.c +++ b/sound/isa/sb/sb16.c @@ -471,7 +471,6 @@ static int snd_sb16_suspend(struct snd_card *card, pm_message_t state) struct snd_sb *chip = acard->chip; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - snd_pcm_suspend_all(chip->pcm); snd_sbmixer_suspend(chip); return 0; } diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c index bf3db0d2ea12..a09ad57b8313 100644 --- a/sound/isa/sb/sb16_csp.c +++ b/sound/isa/sb/sb16_csp.c @@ -1126,10 +1126,9 @@ static int snd_sb_csp_qsound_transfer(struct snd_sb_csp * p) static int init_proc_entry(struct snd_sb_csp * p, int device) { char name[16]; - struct snd_info_entry *entry; + sprintf(name, "cspD%d", device); - if (! snd_card_proc_new(p->chip->card, name, &entry)) - snd_info_set_text_ops(entry, p, info_read); + snd_card_ro_proc_new(p->chip->card, name, p, info_read); return 0; } diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c index 37e6ce7b0b13..473ec74ae48c 100644 --- a/sound/isa/sb/sb16_main.c +++ b/sound/isa/sb/sb16_main.c @@ -879,13 +879,17 @@ int snd_sb16dsp_pcm(struct snd_sb *chip, int device) snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sb16_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_sb16_capture_ops); - if (chip->dma16 >= 0 && chip->dma8 != chip->dma16) - snd_ctl_add(card, snd_ctl_new1(&snd_sb16_dma_control, chip)); - else + if (chip->dma16 >= 0 && chip->dma8 != chip->dma16) { + err = snd_ctl_add(card, snd_ctl_new1( + &snd_sb16_dma_control, chip)); + if (err) + return err; + } else { pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX; + } snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_isa_data(), + card->dev, 64*1024, 128*1024); return 0; } diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c index d77dcba276b5..aa2a83eb81a9 100644 --- a/sound/isa/sb/sb8.c +++ b/sound/isa/sb/sb8.c @@ -218,7 +218,6 @@ static int snd_sb8_suspend(struct device *dev, unsigned int n, struct snd_sb *chip = acard->chip; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - snd_pcm_suspend_all(chip->pcm); snd_sbmixer_suspend(chip); return 0; } diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c index 8288fae90085..97645a732a71 100644 --- a/sound/isa/sb/sb8_main.c +++ b/sound/isa/sb/sb8_main.c @@ -610,7 +610,7 @@ int snd_sb8dsp_pcm(struct snd_sb *chip, int device) if (chip->dma8 > 3 || chip->dma16 >= 0) max_prealloc = 128 * 1024; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_isa_data(), + card->dev, 64*1024, max_prealloc); return 0; diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c index 733adee5afbf..8181db4db019 100644 --- a/sound/isa/sscape.c +++ b/sound/isa/sscape.c @@ -167,12 +167,13 @@ static inline struct soundscape *get_card_soundscape(struct snd_card *c) * I think this means that the memory has to map to * contiguous pages of physical memory. */ -static struct snd_dma_buffer *get_dmabuf(struct snd_dma_buffer *buf, +static struct snd_dma_buffer *get_dmabuf(struct soundscape *s, + struct snd_dma_buffer *buf, unsigned long size) { if (buf) { if (snd_dma_alloc_pages_fallback(SNDRV_DMA_TYPE_DEV, - snd_dma_isa_data(), + s->chip->card->dev, size, buf) < 0) { snd_printk(KERN_ERR "sscape: Failed to allocate " "%lu bytes for DMA\n", @@ -443,7 +444,7 @@ static int upload_dma_data(struct soundscape *s, const unsigned char *data, int ret; unsigned char val; - if (!get_dmabuf(&dma, PAGE_ALIGN(32 * 1024))) + if (!get_dmabuf(s, &dma, PAGE_ALIGN(32 * 1024))) return -ENOMEM; spin_lock_irqsave(&s->lock, flags); diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 3a5008837576..0dfb8065b403 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c @@ -1625,7 +1625,6 @@ static void snd_wss_suspend(struct snd_wss *chip) int reg; unsigned long flags; - snd_pcm_suspend_all(chip->pcm); spin_lock_irqsave(&chip->reg_lock, flags); for (reg = 0; reg < 32; reg++) chip->image[reg] = snd_wss_in(chip, reg); @@ -1943,7 +1942,7 @@ int snd_wss_pcm(struct snd_wss *chip, int device) strcpy(pcm->name, snd_wss_chip_id(chip)); snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - snd_dma_isa_data(), + chip->card->dev, 64*1024, chip->dma1 > 3 || chip->dma2 > 3 ? 128*1024 : 64*1024); chip->pcm = pcm; |