From f7db764f773428c3eb0a6fe528facc3dd677f585 Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Mon, 23 Aug 2010 08:14:35 +0200 Subject: [PATCH] --- yaml --- r: 210119 b: refs/heads/master c: dbbcbc073ad3132bfbc410b11546b2fb4bdf2568 h: refs/heads/master i: 210117: 665deff5534aa9d96df0d6d6b302e29eb23f04e6 210115: 1b5b6f95bf1729bb56c9361f3e7d67d37cfe1b7f 210111: 9551e7332a206fb96849b77cba2cf3a874beabda v: v3 --- [refs] | 2 +- trunk/include/sound/emu10k1.h | 1 - trunk/sound/core/pcm.c | 6 ------ trunk/sound/core/pcm_native.c | 4 ---- trunk/sound/oss/sound_timer.c | 2 +- trunk/sound/pci/asihpi/hpi6205.c | 7 ++----- trunk/sound/pci/emu10k1/emu10k1.c | 4 ---- trunk/sound/pci/emu10k1/emupcm.c | 30 ++++------------------------- trunk/sound/pci/emu10k1/memory.c | 4 +--- trunk/sound/pci/hda/patch_realtek.c | 1 + trunk/sound/pci/intel8x0.c | 6 ------ trunk/sound/pci/riptide/riptide.c | 11 ++++++----- trunk/sound/soc/codecs/wm8776.c | 7 +++++++ trunk/sound/soc/imx/imx-ssi.c | 3 --- 14 files changed, 23 insertions(+), 65 deletions(-) diff --git a/[refs] b/[refs] index 2ed14b3655da..e314b1b4e382 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7a28826ac73d31a379d93785d8fbd24ab492b0bd +refs/heads/master: dbbcbc073ad3132bfbc410b11546b2fb4bdf2568 diff --git a/trunk/include/sound/emu10k1.h b/trunk/include/sound/emu10k1.h index 7dc97d12253c..6a664c3f7c1e 100644 --- a/trunk/include/sound/emu10k1.h +++ b/trunk/include/sound/emu10k1.h @@ -1707,7 +1707,6 @@ struct snd_emu10k1 { unsigned int card_type; /* EMU10K1_CARD_* */ unsigned int ecard_ctrl; /* ecard control bits */ unsigned long dma_mask; /* PCI DMA mask */ - unsigned int delay_pcm_irq; /* in samples */ int max_cache_pages; /* max memory size / PAGE_SIZE */ struct snd_dma_buffer silent_page; /* silent page */ struct snd_dma_buffer ptb_pages; /* page table pages */ diff --git a/trunk/sound/core/pcm.c b/trunk/sound/core/pcm.c index 204af48c5cc1..cbe815dfbdc8 100644 --- a/trunk/sound/core/pcm.c +++ b/trunk/sound/core/pcm.c @@ -203,16 +203,10 @@ static char *snd_pcm_format_names[] = { FORMAT(S18_3BE), FORMAT(U18_3LE), FORMAT(U18_3BE), - FORMAT(G723_24), - FORMAT(G723_24_1B), - FORMAT(G723_40), - FORMAT(G723_40_1B), }; const char *snd_pcm_format_name(snd_pcm_format_t format) { - if (format >= ARRAY_SIZE(snd_pcm_format_names)) - return "Unknown"; return snd_pcm_format_names[format]; } EXPORT_SYMBOL_GPL(snd_pcm_format_name); diff --git a/trunk/sound/core/pcm_native.c b/trunk/sound/core/pcm_native.c index 134fc6c2e08d..a3b2a6479246 100644 --- a/trunk/sound/core/pcm_native.c +++ b/trunk/sound/core/pcm_native.c @@ -978,10 +978,6 @@ static int snd_pcm_do_pause(struct snd_pcm_substream *substream, int push) { if (substream->runtime->trigger_master != substream) return 0; - /* some drivers might use hw_ptr to recover from the pause - - update the hw_ptr now */ - if (push) - snd_pcm_update_hw_ptr(substream); /* The jiffies check in snd_pcm_update_hw_ptr*() is done by * a delta betwen the current jiffies, this gives a large enough * delta, effectively to skip the check once. diff --git a/trunk/sound/oss/sound_timer.c b/trunk/sound/oss/sound_timer.c index 48cda6c4c257..f0f0c19fbff7 100644 --- a/trunk/sound/oss/sound_timer.c +++ b/trunk/sound/oss/sound_timer.c @@ -26,7 +26,7 @@ static unsigned long prev_event_time; static volatile unsigned long usecs_per_tmr; /* Length of the current interval */ static struct sound_lowlev_timer *tmr; -static DEFINE_SPINLOCK(lock); +static spinlock_t lock; static unsigned long tmr2ticks(int tmr_value) { diff --git a/trunk/sound/pci/asihpi/hpi6205.c b/trunk/sound/pci/asihpi/hpi6205.c index 22c5fc625533..3b4413448226 100644 --- a/trunk/sound/pci/asihpi/hpi6205.c +++ b/trunk/sound/pci/asihpi/hpi6205.c @@ -941,7 +941,8 @@ static void outstream_host_buffer_free(struct hpi_adapter_obj *pao, } -static u32 outstream_get_space_available(struct hpi_hostbuffer_status *status) +static u32 outstream_get_space_available(struct hpi_hostbuffer_status + *status) { return status->size_in_bytes - (status->host_index - status->dSP_index); @@ -986,10 +987,6 @@ static void outstream_write(struct hpi_adapter_obj *pao, /* write it */ phm->function = HPI_OSTREAM_WRITE; hw_message(pao, phm, phr); - - if (phr->error) - return; - /* update status information that the DSP would typically * update (and will update next time the DSP * buffer update task reads data from the host BBM buffer) diff --git a/trunk/sound/pci/emu10k1/emu10k1.c b/trunk/sound/pci/emu10k1/emu10k1.c index aff8387c45cf..4203782d7cb7 100644 --- a/trunk/sound/pci/emu10k1/emu10k1.c +++ b/trunk/sound/pci/emu10k1/emu10k1.c @@ -52,7 +52,6 @@ static int max_synth_voices[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 64}; static int max_buffer_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 128}; static int enable_ir[SNDRV_CARDS]; static uint subsystem[SNDRV_CARDS]; /* Force card subsystem model */ -static uint delay_pcm_irq[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2}; module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for the EMU10K1 soundcard."); @@ -74,8 +73,6 @@ module_param_array(enable_ir, bool, NULL, 0444); MODULE_PARM_DESC(enable_ir, "Enable IR."); module_param_array(subsystem, uint, NULL, 0444); MODULE_PARM_DESC(subsystem, "Force card subsystem model."); -module_param_array(delay_pcm_irq, uint, NULL, 0444); -MODULE_PARM_DESC(delay_pcm_irq, "Delay PCM interrupt by specified number of samples (default 0)."); /* * Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400 */ @@ -130,7 +127,6 @@ static int __devinit snd_card_emu10k1_probe(struct pci_dev *pci, &emu)) < 0) goto error; card->private_data = emu; - emu->delay_pcm_irq = delay_pcm_irq[dev] & 0x1f; if ((err = snd_emu10k1_pcm(emu, 0, NULL)) < 0) goto error; if ((err = snd_emu10k1_pcm_mic(emu, 1, NULL)) < 0) diff --git a/trunk/sound/pci/emu10k1/emupcm.c b/trunk/sound/pci/emu10k1/emupcm.c index 622bace148e3..55b83ef73c63 100644 --- a/trunk/sound/pci/emu10k1/emupcm.c +++ b/trunk/sound/pci/emu10k1/emupcm.c @@ -332,7 +332,7 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu, evoice->epcm->ccca_start_addr = start_addr + ccis; if (extra) { start_addr += ccis; - end_addr += ccis + emu->delay_pcm_irq; + end_addr += ccis; } if (stereo && !extra) { snd_emu10k1_ptr_write(emu, CPF, voice, CPF_STEREO_MASK); @@ -360,9 +360,7 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu, /* Assumption that PT is already 0 so no harm overwriting */ snd_emu10k1_ptr_write(emu, PTRX, voice, (send_amount[0] << 8) | send_amount[1]); snd_emu10k1_ptr_write(emu, DSL, voice, end_addr | (send_amount[3] << 24)); - snd_emu10k1_ptr_write(emu, PSST, voice, - (start_addr + (extra ? emu->delay_pcm_irq : 0)) | - (send_amount[2] << 24)); + snd_emu10k1_ptr_write(emu, PSST, voice, start_addr | (send_amount[2] << 24)); if (emu->card_capabilities->emu_model) pitch_target = PITCH_48000; /* Disable interpolators on emu1010 card */ else @@ -734,23 +732,6 @@ static void snd_emu10k1_playback_stop_voice(struct snd_emu10k1 *emu, struct snd_ snd_emu10k1_ptr_write(emu, IP, voice, 0); } -static inline void snd_emu10k1_playback_mangle_extra(struct snd_emu10k1 *emu, - struct snd_emu10k1_pcm *epcm, - struct snd_pcm_substream *substream, - struct snd_pcm_runtime *runtime) -{ - unsigned int ptr, period_pos; - - /* try to sychronize the current position for the interrupt - source voice */ - period_pos = runtime->status->hw_ptr - runtime->hw_ptr_interrupt; - period_pos %= runtime->period_size; - ptr = snd_emu10k1_ptr_read(emu, CCCA, epcm->extra->number); - ptr &= ~0x00ffffff; - ptr |= epcm->ccca_start_addr + period_pos; - snd_emu10k1_ptr_write(emu, CCCA, epcm->extra->number, ptr); -} - static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream, int cmd) { @@ -772,8 +753,6 @@ static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream, /* follow thru */ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: case SNDRV_PCM_TRIGGER_RESUME: - if (cmd == SNDRV_PCM_TRIGGER_PAUSE_RELEASE) - snd_emu10k1_playback_mangle_extra(emu, epcm, substream, runtime); mix = &emu->pcm_mixer[substream->number]; snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 1, 0, mix); snd_emu10k1_playback_prepare_voice(emu, epcm->voices[1], 0, 0, mix); @@ -890,9 +869,8 @@ static snd_pcm_uframes_t snd_emu10k1_playback_pointer(struct snd_pcm_substream * #endif /* printk(KERN_DEBUG - "ptr = 0x%lx, buffer_size = 0x%lx, period_size = 0x%lx\n", - (long)ptr, (long)runtime->buffer_size, - (long)runtime->period_size); + "ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n", + ptr, runtime->buffer_size, runtime->period_size); */ return ptr; } diff --git a/trunk/sound/pci/emu10k1/memory.c b/trunk/sound/pci/emu10k1/memory.c index 957a311514c8..ffb1ddb8dc28 100644 --- a/trunk/sound/pci/emu10k1/memory.c +++ b/trunk/sound/pci/emu10k1/memory.c @@ -310,10 +310,8 @@ snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *subst if (snd_BUG_ON(!hdr)) return NULL; - idx = runtime->period_size >= runtime->buffer_size ? - (emu->delay_pcm_irq * 2) : 0; mutex_lock(&hdr->block_mutex); - blk = search_empty(emu, runtime->dma_bytes + idx); + blk = search_empty(emu, runtime->dma_bytes); if (blk == NULL) { mutex_unlock(&hdr->block_mutex); return NULL; diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index a4dd04524e43..627bf9963368 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -14467,6 +14467,7 @@ static const struct alc_fixup alc269_fixups[] = { static struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x104d, 0x9071, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), + SND_PCI_QUIRK(0x104d, 0x9077, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), {} }; diff --git a/trunk/sound/pci/intel8x0.c b/trunk/sound/pci/intel8x0.c index 467749249576..6433e65c9507 100644 --- a/trunk/sound/pci/intel8x0.c +++ b/trunk/sound/pci/intel8x0.c @@ -1774,12 +1774,6 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { .name = "HP/Compaq nx7010", .type = AC97_TUNE_MUTE_LED }, - { - .subvendor = 0x1014, - .subdevice = 0x0534, - .name = "ThinkPad X31", - .type = AC97_TUNE_INV_EAPD - }, { .subvendor = 0x1014, .subdevice = 0x1f00, diff --git a/trunk/sound/pci/riptide/riptide.c b/trunk/sound/pci/riptide/riptide.c index ad5202efd7a9..f64fb7d988cb 100644 --- a/trunk/sound/pci/riptide/riptide.c +++ b/trunk/sound/pci/riptide/riptide.c @@ -1224,14 +1224,15 @@ static int try_to_load_firmware(struct cmdif *cif, struct snd_riptide *chip) firmware.firmware.ASIC, firmware.firmware.CODEC, firmware.firmware.AUXDSP, firmware.firmware.PROG); - if (!chip) - return 1; - for (i = 0; i < FIRMWARE_VERSIONS; i++) { if (!memcmp(&firmware_versions[i], &firmware, sizeof(firmware))) - return 1; /* OK */ - + break; } + if (i >= FIRMWARE_VERSIONS) + return 0; /* no match */ + + if (!chip) + return 1; /* OK */ snd_printdd("Writing Firmware\n"); if (!chip->fw_entry) { diff --git a/trunk/sound/soc/codecs/wm8776.c b/trunk/sound/soc/codecs/wm8776.c index f8154e661524..4e212ed62ea6 100644 --- a/trunk/sound/soc/codecs/wm8776.c +++ b/trunk/sound/soc/codecs/wm8776.c @@ -178,6 +178,13 @@ static int wm8776_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) case SND_SOC_DAIFMT_LEFT_J: iface |= 0x0001; break; + /* FIXME: CHECK A/B */ + case SND_SOC_DAIFMT_DSP_A: + iface |= 0x0003; + break; + case SND_SOC_DAIFMT_DSP_B: + iface |= 0x0007; + break; default: return -EINVAL; } diff --git a/trunk/sound/soc/imx/imx-ssi.c b/trunk/sound/soc/imx/imx-ssi.c index c81da05a4f11..a11daa1e905b 100644 --- a/trunk/sound/soc/imx/imx-ssi.c +++ b/trunk/sound/soc/imx/imx-ssi.c @@ -254,9 +254,6 @@ static int imx_ssi_hw_params(struct snd_pcm_substream *substream, dma_data = &ssi->dma_params_rx; } - if (ssi->flags & IMX_SSI_SYN) - reg = SSI_STCCR; - snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data); sccr = readl(ssi->base + reg) & ~SSI_STCCR_WL_MASK;