diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-05-03 10:47:03 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-05-03 10:47:03 -0400 |
commit | 0f8f56c959c9c4a65a5ad13f1b49d97db30b5c2f (patch) | |
tree | 87fde35926c524d466fa0c4897d05e68e3c26718 /sound/pci/lola/lola.c | |
parent | 333ff3971f374d9a057fd6d1492a2ef78989974d (diff) |
ALSA: lola - Fix PCM stalls
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/lola/lola.c')
-rw-r--r-- | sound/pci/lola/lola.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c index 16c6cad2e7cd..4d8221505b9e 100644 --- a/sound/pci/lola/lola.c +++ b/sound/pci/lola/lola.c | |||
@@ -73,6 +73,7 @@ static int corb_send_verb(struct lola *chip, unsigned int nid, | |||
73 | chip->last_data = data; | 73 | chip->last_data = data; |
74 | chip->last_extdata = extdata; | 74 | chip->last_extdata = extdata; |
75 | data |= (nid << 20) | (verb << 8); | 75 | data |= (nid << 20) | (verb << 8); |
76 | |||
76 | spin_lock_irqsave(&chip->reg_lock, flags); | 77 | spin_lock_irqsave(&chip->reg_lock, flags); |
77 | if (chip->rirb.cmds < LOLA_CORB_ENTRIES - 1) { | 78 | if (chip->rirb.cmds < LOLA_CORB_ENTRIES - 1) { |
78 | unsigned int wp = chip->corb.wp + 1; | 79 | unsigned int wp = chip->corb.wp + 1; |
@@ -338,8 +339,6 @@ static int setup_corb_rirb(struct lola *chip) | |||
338 | chip->corb.buf = (u32 *)chip->rb.area; | 339 | chip->corb.buf = (u32 *)chip->rb.area; |
339 | chip->rirb.addr = chip->rb.addr + 2048; | 340 | chip->rirb.addr = chip->rb.addr + 2048; |
340 | chip->rirb.buf = (u32 *)(chip->rb.area + 2048); | 341 | chip->rirb.buf = (u32 *)(chip->rb.area + 2048); |
341 | lola_writel(chip, BAR0, CORBLBASE, (u32)chip->corb.addr); | ||
342 | lola_writel(chip, BAR0, CORBUBASE, upper_32_bits(chip->corb.addr)); | ||
343 | 342 | ||
344 | /* disable ringbuffer DMAs */ | 343 | /* disable ringbuffer DMAs */ |
345 | lola_writeb(chip, BAR0, RIRBCTL, 0); | 344 | lola_writeb(chip, BAR0, RIRBCTL, 0); |
@@ -496,6 +495,10 @@ static int lola_parse_tree(struct lola *chip) | |||
496 | if (!chip->cold_reset) { | 495 | if (!chip->cold_reset) { |
497 | lola_reset_setups(chip); | 496 | lola_reset_setups(chip); |
498 | chip->cold_reset = 1; | 497 | chip->cold_reset = 1; |
498 | } else { | ||
499 | /* set the granularity if it is not the default */ | ||
500 | if (chip->granularity != LOLA_GRANULARITY_MIN) | ||
501 | lola_set_granularity(chip, chip->granularity, true); | ||
499 | } | 502 | } |
500 | 503 | ||
501 | return 0; | 504 | return 0; |
@@ -561,8 +564,14 @@ static int __devinit lola_create(struct snd_card *card, struct pci_dev *pci, | |||
561 | chip->pci = pci; | 564 | chip->pci = pci; |
562 | chip->irq = -1; | 565 | chip->irq = -1; |
563 | 566 | ||
564 | chip->sample_rate_min = 48000; | 567 | /* below a sample_rate of 16kHz the analogue audio quality |
565 | chip->granularity = LOLA_GRANULARITY_MIN; | 568 | * is NOT excellent |
569 | */ | ||
570 | chip->sample_rate_min = 16000; | ||
571 | /* for instance use always max granularity which is compatible | ||
572 | * with all sample rates | ||
573 | */ | ||
574 | chip->granularity = LOLA_GRANULARITY_MAX; | ||
566 | 575 | ||
567 | err = pci_request_regions(pci, DRVNAME); | 576 | err = pci_request_regions(pci, DRVNAME); |
568 | if (err < 0) { | 577 | if (err < 0) { |