summaryrefslogtreecommitdiffstats
path: root/sound/pci/lola/lola.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-03 16:47:03 +0200
committerTakashi Iwai <tiwai@suse.de>2011-05-03 16:47:03 +0200
commit0f8f56c959c9c4a65a5ad13f1b49d97db30b5c2f (patch)
tree87fde35926c524d466fa0c4897d05e68e3c26718 /sound/pci/lola/lola.c
parent333ff3971f374d9a057fd6d1492a2ef78989974d (diff)
downloadtalos-op-linux-0f8f56c959c9c4a65a5ad13f1b49d97db30b5c2f.tar.gz
talos-op-linux-0f8f56c959c9c4a65a5ad13f1b49d97db30b5c2f.zip
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.c17
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,
chip->last_data = data;
chip->last_extdata = extdata;
data |= (nid << 20) | (verb << 8);
+
spin_lock_irqsave(&chip->reg_lock, flags);
if (chip->rirb.cmds < LOLA_CORB_ENTRIES - 1) {
unsigned int wp = chip->corb.wp + 1;
@@ -338,8 +339,6 @@ static int setup_corb_rirb(struct lola *chip)
chip->corb.buf = (u32 *)chip->rb.area;
chip->rirb.addr = chip->rb.addr + 2048;
chip->rirb.buf = (u32 *)(chip->rb.area + 2048);
- lola_writel(chip, BAR0, CORBLBASE, (u32)chip->corb.addr);
- lola_writel(chip, BAR0, CORBUBASE, upper_32_bits(chip->corb.addr));
/* disable ringbuffer DMAs */
lola_writeb(chip, BAR0, RIRBCTL, 0);
@@ -496,6 +495,10 @@ static int lola_parse_tree(struct lola *chip)
if (!chip->cold_reset) {
lola_reset_setups(chip);
chip->cold_reset = 1;
+ } else {
+ /* set the granularity if it is not the default */
+ if (chip->granularity != LOLA_GRANULARITY_MIN)
+ lola_set_granularity(chip, chip->granularity, true);
}
return 0;
@@ -561,8 +564,14 @@ static int __devinit lola_create(struct snd_card *card, struct pci_dev *pci,
chip->pci = pci;
chip->irq = -1;
- chip->sample_rate_min = 48000;
- chip->granularity = LOLA_GRANULARITY_MIN;
+ /* below a sample_rate of 16kHz the analogue audio quality
+ * is NOT excellent
+ */
+ chip->sample_rate_min = 16000;
+ /* for instance use always max granularity which is compatible
+ * with all sample rates
+ */
+ chip->granularity = LOLA_GRANULARITY_MAX;
err = pci_request_regions(pci, DRVNAME);
if (err < 0) {
OpenPOWER on IntegriCloud