aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/es1938.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/es1938.c')
-rw-r--r--sound/pci/es1938.c37
1 files changed, 7 insertions, 30 deletions
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c
index c571c5d380ca..8336b20fbafc 100644
--- a/sound/pci/es1938.c
+++ b/sound/pci/es1938.c
@@ -863,25 +863,6 @@ static int snd_es1938_capture_copy_kernel(struct snd_pcm_substream *substream,
return 0;
}
-/*
- * buffer management
- */
-static int snd_es1938_pcm_hw_params(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *hw_params)
-
-{
- int err;
-
- if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0)
- return err;
- return 0;
-}
-
-static int snd_es1938_pcm_hw_free(struct snd_pcm_substream *substream)
-{
- return snd_pcm_lib_free_pages(substream);
-}
-
/* ----------------------------------------------------------------------
* Audio1 Capture (ADC)
* ----------------------------------------------------------------------*/
@@ -996,9 +977,6 @@ static int snd_es1938_playback_close(struct snd_pcm_substream *substream)
static const struct snd_pcm_ops snd_es1938_playback_ops = {
.open = snd_es1938_playback_open,
.close = snd_es1938_playback_close,
- .ioctl = snd_pcm_lib_ioctl,
- .hw_params = snd_es1938_pcm_hw_params,
- .hw_free = snd_es1938_pcm_hw_free,
.prepare = snd_es1938_playback_prepare,
.trigger = snd_es1938_playback_trigger,
.pointer = snd_es1938_playback_pointer,
@@ -1007,9 +985,6 @@ static const struct snd_pcm_ops snd_es1938_playback_ops = {
static const struct snd_pcm_ops snd_es1938_capture_ops = {
.open = snd_es1938_capture_open,
.close = snd_es1938_capture_close,
- .ioctl = snd_pcm_lib_ioctl,
- .hw_params = snd_es1938_pcm_hw_params,
- .hw_free = snd_es1938_pcm_hw_free,
.prepare = snd_es1938_capture_prepare,
.trigger = snd_es1938_capture_trigger,
.pointer = snd_es1938_capture_pointer,
@@ -1031,9 +1006,8 @@ static int snd_es1938_new_pcm(struct es1938 *chip, int device)
pcm->info_flags = 0;
strcpy(pcm->name, "ESS Solo-1");
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
- &chip->pci->dev,
- 64*1024, 64*1024);
+ snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
+ &chip->pci->dev, 64*1024, 64*1024);
chip->pcm = pcm;
return 0;
@@ -1333,7 +1307,7 @@ static const DECLARE_TLV_DB_RANGE(db_scale_line,
static const DECLARE_TLV_DB_SCALE(db_scale_capture, 0, 150, 0);
-static struct snd_kcontrol_new snd_es1938_controls[] = {
+static const struct snd_kcontrol_new snd_es1938_controls[] = {
ES1938_DOUBLE_TLV("Master Playback Volume", 0, 0x60, 0x62, 0, 0, 63, 0,
db_scale_master),
ES1938_DOUBLE("Master Playback Switch", 0, 0x60, 0x62, 6, 6, 1, 1),
@@ -1470,6 +1444,7 @@ static int es1938_suspend(struct device *dev)
if (chip->irq >= 0) {
free_irq(chip->irq, chip);
chip->irq = -1;
+ card->sync_irq = -1;
}
return 0;
}
@@ -1489,6 +1464,7 @@ static int es1938_resume(struct device *dev)
return -EIO;
}
chip->irq = pci->irq;
+ card->sync_irq = chip->irq;
snd_es1938_chip_init(chip);
/* restore mixer-related registers */
@@ -1572,7 +1548,7 @@ static int snd_es1938_create(struct snd_card *card,
{
struct es1938 *chip;
int err;
- static struct snd_device_ops ops = {
+ static const struct snd_device_ops ops = {
.dev_free = snd_es1938_dev_free,
};
@@ -1617,6 +1593,7 @@ static int snd_es1938_create(struct snd_card *card,
return -EBUSY;
}
chip->irq = pci->irq;
+ card->sync_irq = chip->irq;
dev_dbg(card->dev,
"create: io: 0x%lx, sb: 0x%lx, vc: 0x%lx, mpu: 0x%lx, game: 0x%lx\n",
chip->io_port, chip->sb_port, chip->vc_port, chip->mpu_port, chip->game_port);