Skip to content

Commit cc99a08

Browse files
committed
Merge branch 'fix/misc' into topic/misc
2 parents bc3a8a0 + 382225e commit cc99a08

46 files changed

Lines changed: 348 additions & 172 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/sound/alsa/HD-Audio-Models.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ Conexant 5066
296296
=============
297297
laptop Basic Laptop config (default)
298298
hp-laptop HP laptops, e g G60
299+
asus Asus K52JU, Lenovo G560
299300
dell-laptop Dell laptops
300301
dell-vostro Dell Vostro
301302
olpc-xo-1_5 OLPC XO 1.5

‎sound/atmel/ac97c.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@
3333
#include <linux/dw_dmac.h>
3434

3535
#include <mach/cpu.h>
36-
#include <mach/hardware.h>
3736
#include <mach/gpio.h>
3837

38+
#ifdef CONFIG_ARCH_AT91
39+
#include <mach/hardware.h>
40+
#endif
41+
3942
#include "ac97c.h"
4043

4144
enum {

‎sound/core/hrtimer.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
4545
{
4646
struct snd_hrtimer *stime = container_of(hrt, struct snd_hrtimer, hrt);
4747
struct snd_timer *t = stime->timer;
48+
unsigned long oruns;
4849

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

52-
hrtimer_forward_now(hrt, ns_to_ktime(t->sticks * resolution));
53-
snd_timer_interrupt(stime->timer, t->sticks);
53+
oruns = hrtimer_forward_now(hrt, ns_to_ktime(t->sticks * resolution));
54+
snd_timer_interrupt(stime->timer, t->sticks * oruns);
5455

5556
if (!atomic_read(&stime->running))
5657
return HRTIMER_NORESTART;
@@ -104,7 +105,7 @@ static int snd_hrtimer_stop(struct snd_timer *t)
104105
}
105106

106107
static struct snd_timer_hardware hrtimer_hw = {
107-
.flags = SNDRV_TIMER_HW_AUTO,
108+
.flags = SNDRV_TIMER_HW_AUTO | SNDRV_TIMER_HW_TASKLET,
108109
.open = snd_hrtimer_open,
109110
.close = snd_hrtimer_close,
110111
.start = snd_hrtimer_start,

‎sound/core/jack.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,
141141

142142
fail_input:
143143
input_free_device(jack->input_dev);
144+
kfree(jack->id);
144145
kfree(jack);
145146
return err;
146147
}

‎sound/drivers/mtpav.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,13 @@
5555
#include <linux/err.h>
5656
#include <linux/platform_device.h>
5757
#include <linux/ioport.h>
58+
#include <linux/io.h>
5859
#include <linux/moduleparam.h>
5960
#include <sound/core.h>
6061
#include <sound/initval.h>
6162
#include <sound/rawmidi.h>
6263
#include <linux/delay.h>
6364

64-
#include <asm/io.h>
65-
6665
/*
6766
* globals
6867
*/

‎sound/oss/Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ ifeq ($(CONFIG_PSS_HAVE_BOOT),y)
8787
$(obj)/bin2hex pss_synth < $< > $@
8888
else
8989
$(obj)/pss_boot.h:
90-
( \
90+
$(Q)( \
9191
echo 'static unsigned char * pss_synth = NULL;'; \
9292
echo 'static int pss_synthLen = 0;'; \
9393
) > $@
@@ -102,7 +102,7 @@ ifeq ($(CONFIG_TRIX_HAVE_BOOT),y)
102102
$(obj)/hex2hex -i trix_boot < $< > $@
103103
else
104104
$(obj)/trix_boot.h:
105-
( \
105+
$(Q)( \
106106
echo 'static unsigned char * trix_boot = NULL;'; \
107107
echo 'static int trix_boot_len = 0;'; \
108108
) > $@

‎sound/pci/au88x0/au88x0_core.c‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,11 +1252,19 @@ static void vortex_adbdma_resetup(vortex_t *vortex, int adbdma) {
12521252
static int inline vortex_adbdma_getlinearpos(vortex_t * vortex, int adbdma)
12531253
{
12541254
stream_t *dma = &vortex->dma_adb[adbdma];
1255-
int temp;
1255+
int temp, page, delta;
12561256

12571257
temp = hwread(vortex->mmio, VORTEX_ADBDMA_STAT + (adbdma << 2));
1258-
temp = (dma->period_virt * dma->period_bytes) + (temp & (dma->period_bytes - 1));
1259-
return temp;
1258+
page = (temp & ADB_SUBBUF_MASK) >> ADB_SUBBUF_SHIFT;
1259+
if (dma->nr_periods >= 4)
1260+
delta = (page - dma->period_real) & 3;
1261+
else {
1262+
delta = (page - dma->period_real);
1263+
if (delta < 0)
1264+
delta += dma->nr_periods;
1265+
}
1266+
return (dma->period_virt + delta) * dma->period_bytes
1267+
+ (temp & (dma->period_bytes - 1));
12601268
}
12611269

12621270
static void vortex_adbdma_startfifo(vortex_t * vortex, int adbdma)

‎sound/pci/azt3328.c‎

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,31 +1317,25 @@ snd_azf3328_codec_setfmt(struct snd_azf3328_codec_data *codec,
13171317

13181318
snd_azf3328_dbgcallenter();
13191319
switch (bitrate) {
1320-
#define AZF_FMT_XLATE(in_freq, out_bits) \
1321-
do { \
1322-
case AZF_FREQ_ ## in_freq: \
1323-
freq = SOUNDFORMAT_FREQ_ ## out_bits; \
1324-
break; \
1325-
} while (0);
1326-
AZF_FMT_XLATE(4000, SUSPECTED_4000)
1327-
AZF_FMT_XLATE(4800, SUSPECTED_4800)
1328-
/* the AZF3328 names it "5510" for some strange reason: */
1329-
AZF_FMT_XLATE(5512, 5510)
1330-
AZF_FMT_XLATE(6620, 6620)
1331-
AZF_FMT_XLATE(8000, 8000)
1332-
AZF_FMT_XLATE(9600, 9600)
1333-
AZF_FMT_XLATE(11025, 11025)
1334-
AZF_FMT_XLATE(13240, SUSPECTED_13240)
1335-
AZF_FMT_XLATE(16000, 16000)
1336-
AZF_FMT_XLATE(22050, 22050)
1337-
AZF_FMT_XLATE(32000, 32000)
1320+
case AZF_FREQ_4000: freq = SOUNDFORMAT_FREQ_SUSPECTED_4000; break;
1321+
case AZF_FREQ_4800: freq = SOUNDFORMAT_FREQ_SUSPECTED_4800; break;
1322+
case AZF_FREQ_5512:
1323+
/* the AZF3328 names it "5510" for some strange reason */
1324+
freq = SOUNDFORMAT_FREQ_5510; break;
1325+
case AZF_FREQ_6620: freq = SOUNDFORMAT_FREQ_6620; break;
1326+
case AZF_FREQ_8000: freq = SOUNDFORMAT_FREQ_8000; break;
1327+
case AZF_FREQ_9600: freq = SOUNDFORMAT_FREQ_9600; break;
1328+
case AZF_FREQ_11025: freq = SOUNDFORMAT_FREQ_11025; break;
1329+
case AZF_FREQ_13240: freq = SOUNDFORMAT_FREQ_SUSPECTED_13240; break;
1330+
case AZF_FREQ_16000: freq = SOUNDFORMAT_FREQ_16000; break;
1331+
case AZF_FREQ_22050: freq = SOUNDFORMAT_FREQ_22050; break;
1332+
case AZF_FREQ_32000: freq = SOUNDFORMAT_FREQ_32000; break;
13381333
default:
13391334
snd_printk(KERN_WARNING "unknown bitrate %d, assuming 44.1kHz!\n", bitrate);
13401335
/* fall-through */
1341-
AZF_FMT_XLATE(44100, 44100)
1342-
AZF_FMT_XLATE(48000, 48000)
1343-
AZF_FMT_XLATE(66200, SUSPECTED_66200)
1344-
#undef AZF_FMT_XLATE
1336+
case AZF_FREQ_44100: freq = SOUNDFORMAT_FREQ_44100; break;
1337+
case AZF_FREQ_48000: freq = SOUNDFORMAT_FREQ_48000; break;
1338+
case AZF_FREQ_66200: freq = SOUNDFORMAT_FREQ_SUSPECTED_66200; break;
13451339
}
13461340
/* val = 0xff07; 3m27.993s (65301Hz; -> 64000Hz???) hmm, 66120, 65967, 66123 */
13471341
/* val = 0xff09; 17m15.098s (13123,478Hz; -> 12000Hz???) hmm, 13237.2Hz? */

‎sound/pci/hda/hda_eld.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ static void hdmi_show_short_audio_desc(struct cea_sad *a)
381381
snd_print_pcm_rates(a->rates, buf, sizeof(buf));
382382

383383
if (a->format == AUDIO_CODING_TYPE_LPCM)
384-
snd_print_pcm_bits(a->sample_bits, buf2 + 8, sizeof(buf2 - 8));
384+
snd_print_pcm_bits(a->sample_bits, buf2 + 8, sizeof(buf2) - 8);
385385
else if (a->max_bitrate)
386386
snprintf(buf2, sizeof(buf2),
387387
", max bitrate = %d", a->max_bitrate);

‎sound/pci/hda/hda_intel.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2308,6 +2308,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = {
23082308
SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
23092309
SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB),
23102310
SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB),
2311+
SND_PCI_QUIRK(0x1043, 0x8410, "ASUS", POS_FIX_LPIB),
23112312
SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB),
23122313
SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
23132314
SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba A100-259", POS_FIX_LPIB),
@@ -2703,7 +2704,7 @@ static int __devinit azx_probe(struct pci_dev *pci,
27032704
if (err < 0)
27042705
goto out_free;
27052706
#ifdef CONFIG_SND_HDA_PATCH_LOADER
2706-
if (patch[dev]) {
2707+
if (patch[dev] && *patch[dev]) {
27072708
snd_printk(KERN_ERR SFX "Applying patch firmware '%s'\n",
27082709
patch[dev]);
27092710
err = snd_hda_load_patch(chip->bus, patch[dev]);

0 commit comments

Comments
 (0)