sound fixes
Subsystems (6)
Linus,
please pull ALSA updates for v2.6.30-rc5 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus
Relative large number of LOCs found here are for Davici fixes after upstream sync, so pretty safe to others. Otherwise only trivial fixes.
Thanks!
Takashi
===
David Brownell (3):
ASoC: davinci-pcm buildfixes
ASoC: DaVinci I2S updates
ASoC: DaVinci EVM board support buildfixes
Mike Rapoport (2):
ASoC: soc-core: fix crash when removing not instantiated card
pxa2xx-ac97: fix reset gpio mode setting
Randy Dunlap (1):
ALSA: pcsp: fix printk format warning
Roel Kluin (1):
ALSA: riptide: postfix increment and off by one
--- arch/arm/mach-davinci/include/mach/asp.h | 25 ++++++++++ sound/arm/pxa2xx-ac97-lib.c | 2 +- sound/drivers/pcsp/pcsp_mixer.c | 2 +- sound/pci/riptide/riptide.c | 10 +++-- sound/soc/davinci/Kconfig | 7 ++- sound/soc/davinci/davinci-evm.c | 63 ++++++++++++++++++++++----- sound/soc/davinci/davinci-i2s.c | 26 ++++++++++- sound/soc/davinci/davinci-pcm.c | 71 +++++++++++++++++------------ sound/soc/soc-core.c | 3 + 9 files changed, 157 insertions(+), 52 deletions(-) create mode 100644 arch/arm/mach-davinci/include/mach/asp.h
arch/arm/mach-davinci/include/mach/asp.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* <mach/asp.h> - DaVinci Audio Serial Port support +*/ +#ifndef __ASM_ARCH_DAVINCI_ASP_H +#define __ASM_ARCH_DAVINCI_ASP_H + +#include <mach/irqs.h> + +/* Bases of register banks */ +#define DAVINCI_ASP0_BASE 0x01E02000 +#define DAVINCI_ASP1_BASE 0x01E04000 + +/* EDMA channels */ +#define DAVINCI_DMA_ASP0_TX 2 +#define DAVINCI_DMA_ASP0_RX 3 +#define DAVINCI_DMA_ASP1_TX 8 +#define DAVINCI_DMA_ASP1_RX 9 + +/* Interrupts */ +#define DAVINCI_ASP0_RX_INT IRQ_MBRINT +#define DAVINCI_ASP0_TX_INT IRQ_MBXINT +#define DAVINCI_ASP1_RX_INT IRQ_MBRINT +#define DAVINCI_ASP1_TX_INT IRQ_MBXINT + +#endif /* __ASM_ARCH_DAVINCI_ASP_H */
sound/arm/pxa2xx-ac97-lib.c +1 -1
@@ -65,7 +65,7 @@ static void set_resetgpio_mode(int resetgpio_action)switch (resetgpio_action) {case RESETGPIO_NORMAL_ALTFUNC :if (reset_gpio ==113 ) - mode =113 |GPIO_OUT |GPIO_DFLT_LOW ; + mode =113 |GPIO_ALT_FN_2_OUT ;if (reset_gpio ==95 ) mode =95 |GPIO_ALT_FN_1_OUT ;break ;
sound/drivers/pcsp/pcsp_mixer.c +1 -1
@@ -50,7 +50,7 @@ static int pcsp_treble_info(struct snd_kcontrol *kcontrol, uinfo->value.enumerated.items = chip->max_treble +1 ;if (uinfo->value.enumerated.item > chip->max_treble) uinfo->value.enumerated.item = chip->max_treble; -sprintf (uinfo->value.enumerated.name,"%d" , +sprintf (uinfo->value.enumerated.name,"%lu" ,PCSP_CALC_RATE (uinfo->value.enumerated.item));return 0 ; }
sound/pci/riptide/riptide.c +6 -4
@@ -889,7 +889,7 @@ static int sendcmd(struct cmdif *cif, u32 flags, u32 cmd, u32 parm,spin_lock_irqsave (&cif->lock, irqflags);while (i++ <CMDIF_TIMEOUT && !IS_READY (cif->hwport))udelay (10 ); -if (i >=CMDIF_TIMEOUT ) { +if (i >CMDIF_TIMEOUT ) { err = -EBUSY ; goto errout; }
@@ -907,8 +907,10 @@ static int sendcmd(struct cmdif *cif, u32 flags, u32 cmd, u32 parm,WRITE_PORT_ULONG (cmdport->data1, cmd);/* write cmd */ if ((flags &RESP ) && ret) {while (!IS_DATF (cmdport) && - time++ <CMDIF_TIMEOUT ) + time <CMDIF_TIMEOUT ) {udelay (10 ); + time++; + }if (time <CMDIF_TIMEOUT ) {/* read response */ ret->retlongs[0 ] =READ_PORT_ULONG (cmdport->data1);
@@ -1454,7 +1456,7 @@ static int snd_riptide_trigger(struct snd_pcm_substream *substream, int cmd)SEND_GPOS (cif,0 , data->id, &rptr);udelay (1 ); }while (i != rptr.retlongs[1 ] && j++ <MAX_WRITE_RETRY ); -if (j >=MAX_WRITE_RETRY ) +if (j >MAX_WRITE_RETRY )snd_printk (KERN_ERR "Riptide: Could not stop stream!" );break ;case SNDRV_PCM_TRIGGER_PAUSE_PUSH :
@@ -1783,7 +1785,7 @@ snd_riptide_codec_write(struct snd_ac97 *ac97, unsigned short reg,SEND_SACR (cif, val, reg);SEND_RACR (cif, reg, &rptr); }while (rptr.retwords[1 ] != val && i++ <MAX_WRITE_RETRY ); -if (i ==MAX_WRITE_RETRY ) +if (i >MAX_WRITE_RETRY )snd_printdd ("Write AC97 reg failed\n" ); }
sound/soc/davinci/Kconfig +4 -3
@@ -10,13 +10,14 @@ config SND_DAVINCI_SOC_I2S tristate config SND_DAVINCI_SOC_EVM - tristate "SoC Audio support for DaVinci EVM" - depends on SND_DAVINCI_SOC && MACH_DAVINCI_EVM + tristate "SoC Audio support for DaVinci DM6446 or DM355 EVM" + depends on SND_DAVINCI_SOC + depends on MACH_DAVINCI_EVM || MACH_DAVINCI_DM355_EVM select SND_DAVINCI_SOC_I2S select SND_SOC_TLV320AIC3X help Say Y if you want to add support for SoC audio on TI - DaVinci EVM platform. + DaVinci DM6446 or DM355 EVM platforms. config SND_DAVINCI_SOC_SFFSDR tristate "SoC Audio support for SFFSDR"
sound/soc/davinci/davinci-evm.c +52 -11
102 lines not on this page · raw message
sound/soc/davinci/davinci-i2s.c +23 -3
@@ -24,6 +24,26 @@#include "davinci-pcm.h" + +/* +* NOTE: terminology here is confusing. +* +* - This driver supports the "Audio Serial Port" (ASP), +* found on dm6446, dm355, and other DaVinci chips. +* +* - But it labels it a "Multi-channel Buffered Serial Port" +* (McBSP) as on older chips like the dm642 ... which was +* backward-compatible, possibly explaining that confusion. +* +* - OMAP chips have a controller called McBSP, which is +* incompatible with the DaVinci flavor of McBSP. +* +* - Newer DaVinci chips have a controller called McASP, +* incompatible with ASP and with either McBSP. +* +* In short: this uses ASP to implement I2S, not McBSP. +* And it won't be the only DaVinci implemention of I2S. +*/ #define DAVINCI_MCBSP_DRR_REG 0x00#define DAVINCI_MCBSP_DXR_REG 0x04#define DAVINCI_MCBSP_SPCR_REG 0x08
@@ -421,7 +441,7 @@ static int davinci_i2s_probe(struct platform_device *pdev, {struct snd_soc_device *socdev =platform_get_drvdata (pdev);struct snd_soc_card *card = socdev->card; -struct snd_soc_dai *cpu_dai = card->dai_link[pdev->id].cpu_dai; +struct snd_soc_dai *cpu_dai = card->dai_link->cpu_dai;struct davinci_mcbsp_dev *dev;struct resource *mem, *ioarea;struct evm_snd_platform_data *pdata;
@@ -448,7 +468,7 @@ static int davinci_i2s_probe(struct platform_device *pdev, cpu_dai->private_data = dev; - dev->clk =clk_get (&pdev->dev,"McBSPCLK" ); + dev->clk =clk_get (&pdev->dev,NULL );if (IS_ERR (dev->clk)) { ret = -ENODEV ; goto err_free_mem;
@@ -483,7 +503,7 @@ static void davinci_i2s_remove(struct platform_device *pdev, {struct snd_soc_device *socdev =platform_get_drvdata (pdev);struct snd_soc_card *card = socdev->card; -struct snd_soc_dai *cpu_dai = card->dai_link[pdev->id].cpu_dai; +struct snd_soc_dai *cpu_dai = card->dai_link->cpu_dai;struct davinci_mcbsp_dev *dev = cpu_dai->private_data;struct resource *mem;
sound/soc/davinci/davinci-pcm.c +42 -29
145 lines not on this page · raw message
sound/soc/soc-core.c +3 -0
@@ -954,6 +954,9 @@ static int soc_remove(struct platform_device *pdev)struct snd_soc_platform *platform = card->platform;struct snd_soc_codec_device *codec_dev = socdev->codec_dev; +if (!card->instantiated) +return 0 ; +run_delayed_work (&card->delayed_work);if (platform->remove)