Skip to content

Commit

Permalink
Merge branch 'fix/misc' into topic/misc
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwai committed Mar 11, 2011
2 parents bc3a8a0 + 382225e commit cc99a08
Show file tree
Hide file tree
Showing 46 changed files with 348 additions and 172 deletions.
1 change: 1 addition & 0 deletions Documentation/sound/alsa/HD-Audio-Models.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ Conexant 5066
=============
laptop Basic Laptop config (default)
hp-laptop HP laptops, e g G60
asus Asus K52JU, Lenovo G560
dell-laptop Dell laptops
dell-vostro Dell Vostro
olpc-xo-1_5 OLPC XO 1.5
Expand Down
5 changes: 4 additions & 1 deletion sound/atmel/ac97c.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@
#include <linux/dw_dmac.h>

#include <mach/cpu.h>
#include <mach/hardware.h>
#include <mach/gpio.h>

#ifdef CONFIG_ARCH_AT91
#include <mach/hardware.h>
#endif

#include "ac97c.h"

enum {
Expand Down
7 changes: 4 additions & 3 deletions sound/core/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
{
struct snd_hrtimer *stime = container_of(hrt, struct snd_hrtimer, hrt);
struct snd_timer *t = stime->timer;
unsigned long oruns;

if (!atomic_read(&stime->running))
return HRTIMER_NORESTART;

hrtimer_forward_now(hrt, ns_to_ktime(t->sticks * resolution));
snd_timer_interrupt(stime->timer, t->sticks);
oruns = hrtimer_forward_now(hrt, ns_to_ktime(t->sticks * resolution));
snd_timer_interrupt(stime->timer, t->sticks * oruns);

if (!atomic_read(&stime->running))
return HRTIMER_NORESTART;
Expand Down Expand Up @@ -104,7 +105,7 @@ static int snd_hrtimer_stop(struct snd_timer *t)
}

static struct snd_timer_hardware hrtimer_hw = {
.flags = SNDRV_TIMER_HW_AUTO,
.flags = SNDRV_TIMER_HW_AUTO | SNDRV_TIMER_HW_TASKLET,
.open = snd_hrtimer_open,
.close = snd_hrtimer_close,
.start = snd_hrtimer_start,
Expand Down
1 change: 1 addition & 0 deletions sound/core/jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,

fail_input:
input_free_device(jack->input_dev);
kfree(jack->id);
kfree(jack);
return err;
}
Expand Down
3 changes: 1 addition & 2 deletions sound/drivers/mtpav.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/ioport.h>
#include <linux/io.h>
#include <linux/moduleparam.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/rawmidi.h>
#include <linux/delay.h>

#include <asm/io.h>

/*
* globals
*/
Expand Down
4 changes: 2 additions & 2 deletions sound/oss/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ ifeq ($(CONFIG_PSS_HAVE_BOOT),y)
$(obj)/bin2hex pss_synth < $< > $@
else
$(obj)/pss_boot.h:
( \
$(Q)( \
echo 'static unsigned char * pss_synth = NULL;'; \
echo 'static int pss_synthLen = 0;'; \
) > $@
Expand All @@ -102,7 +102,7 @@ ifeq ($(CONFIG_TRIX_HAVE_BOOT),y)
$(obj)/hex2hex -i trix_boot < $< > $@
else
$(obj)/trix_boot.h:
( \
$(Q)( \
echo 'static unsigned char * trix_boot = NULL;'; \
echo 'static int trix_boot_len = 0;'; \
) > $@
Expand Down
14 changes: 11 additions & 3 deletions sound/pci/au88x0/au88x0_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,11 +1252,19 @@ static void vortex_adbdma_resetup(vortex_t *vortex, int adbdma) {
static int inline vortex_adbdma_getlinearpos(vortex_t * vortex, int adbdma)
{
stream_t *dma = &vortex->dma_adb[adbdma];
int temp;
int temp, page, delta;

temp = hwread(vortex->mmio, VORTEX_ADBDMA_STAT + (adbdma << 2));
temp = (dma->period_virt * dma->period_bytes) + (temp & (dma->period_bytes - 1));
return temp;
page = (temp & ADB_SUBBUF_MASK) >> ADB_SUBBUF_SHIFT;
if (dma->nr_periods >= 4)
delta = (page - dma->period_real) & 3;
else {
delta = (page - dma->period_real);
if (delta < 0)
delta += dma->nr_periods;
}
return (dma->period_virt + delta) * dma->period_bytes
+ (temp & (dma->period_bytes - 1));
}

static void vortex_adbdma_startfifo(vortex_t * vortex, int adbdma)
Expand Down
38 changes: 16 additions & 22 deletions sound/pci/azt3328.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,31 +1317,25 @@ snd_azf3328_codec_setfmt(struct snd_azf3328_codec_data *codec,

snd_azf3328_dbgcallenter();
switch (bitrate) {
#define AZF_FMT_XLATE(in_freq, out_bits) \
do { \
case AZF_FREQ_ ## in_freq: \
freq = SOUNDFORMAT_FREQ_ ## out_bits; \
break; \
} while (0);
AZF_FMT_XLATE(4000, SUSPECTED_4000)
AZF_FMT_XLATE(4800, SUSPECTED_4800)
/* the AZF3328 names it "5510" for some strange reason: */
AZF_FMT_XLATE(5512, 5510)
AZF_FMT_XLATE(6620, 6620)
AZF_FMT_XLATE(8000, 8000)
AZF_FMT_XLATE(9600, 9600)
AZF_FMT_XLATE(11025, 11025)
AZF_FMT_XLATE(13240, SUSPECTED_13240)
AZF_FMT_XLATE(16000, 16000)
AZF_FMT_XLATE(22050, 22050)
AZF_FMT_XLATE(32000, 32000)
case AZF_FREQ_4000: freq = SOUNDFORMAT_FREQ_SUSPECTED_4000; break;
case AZF_FREQ_4800: freq = SOUNDFORMAT_FREQ_SUSPECTED_4800; break;
case AZF_FREQ_5512:
/* the AZF3328 names it "5510" for some strange reason */
freq = SOUNDFORMAT_FREQ_5510; break;
case AZF_FREQ_6620: freq = SOUNDFORMAT_FREQ_6620; break;
case AZF_FREQ_8000: freq = SOUNDFORMAT_FREQ_8000; break;
case AZF_FREQ_9600: freq = SOUNDFORMAT_FREQ_9600; break;
case AZF_FREQ_11025: freq = SOUNDFORMAT_FREQ_11025; break;
case AZF_FREQ_13240: freq = SOUNDFORMAT_FREQ_SUSPECTED_13240; break;
case AZF_FREQ_16000: freq = SOUNDFORMAT_FREQ_16000; break;
case AZF_FREQ_22050: freq = SOUNDFORMAT_FREQ_22050; break;
case AZF_FREQ_32000: freq = SOUNDFORMAT_FREQ_32000; break;
default:
snd_printk(KERN_WARNING "unknown bitrate %d, assuming 44.1kHz!\n", bitrate);
/* fall-through */
AZF_FMT_XLATE(44100, 44100)
AZF_FMT_XLATE(48000, 48000)
AZF_FMT_XLATE(66200, SUSPECTED_66200)
#undef AZF_FMT_XLATE
case AZF_FREQ_44100: freq = SOUNDFORMAT_FREQ_44100; break;
case AZF_FREQ_48000: freq = SOUNDFORMAT_FREQ_48000; break;
case AZF_FREQ_66200: freq = SOUNDFORMAT_FREQ_SUSPECTED_66200; break;
}
/* val = 0xff07; 3m27.993s (65301Hz; -> 64000Hz???) hmm, 66120, 65967, 66123 */
/* val = 0xff09; 17m15.098s (13123,478Hz; -> 12000Hz???) hmm, 13237.2Hz? */
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_eld.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static void hdmi_show_short_audio_desc(struct cea_sad *a)
snd_print_pcm_rates(a->rates, buf, sizeof(buf));

if (a->format == AUDIO_CODING_TYPE_LPCM)
snd_print_pcm_bits(a->sample_bits, buf2 + 8, sizeof(buf2 - 8));
snd_print_pcm_bits(a->sample_bits, buf2 + 8, sizeof(buf2) - 8);
else if (a->max_bitrate)
snprintf(buf2, sizeof(buf2),
", max bitrate = %d", a->max_bitrate);
Expand Down
3 changes: 2 additions & 1 deletion sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2308,6 +2308,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = {
SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1043, 0x8410, "ASUS", POS_FIX_LPIB),
SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba A100-259", POS_FIX_LPIB),
Expand Down Expand Up @@ -2703,7 +2704,7 @@ static int __devinit azx_probe(struct pci_dev *pci,
if (err < 0)
goto out_free;
#ifdef CONFIG_SND_HDA_PATCH_LOADER
if (patch[dev]) {
if (patch[dev] && *patch[dev]) {
snd_printk(KERN_ERR SFX "Applying patch firmware '%s'\n",
patch[dev]);
err = snd_hda_load_patch(chip->bus, patch[dev]);
Expand Down
Loading

0 comments on commit cc99a08

Please sign in to comment.