diff options
Diffstat (limited to 'sound/spi/at73c213.c')
-rw-r--r-- | sound/spi/at73c213.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c index 4de1ba9a418d..76c0e37a838c 100644 --- a/sound/spi/at73c213.c +++ b/sound/spi/at73c213.c @@ -36,7 +36,7 @@ #define BITRATE_MAX 50000 /* Hardware limit. */ /* Initial (hardware reset) AT73C213 register values. */ -static u8 snd_at73c213_original_image[18] = +static const u8 snd_at73c213_original_image[18] = { 0x00, /* 00 - CTRL */ 0x05, /* 01 - LLIG */ @@ -242,13 +242,7 @@ static int snd_at73c213_pcm_hw_params(struct snd_pcm_substream *substream, val = SSC_BFINS(TFMR_DATNB, channels - 1, val); ssc_writel(chip->ssc->regs, TFMR, val); - return snd_pcm_lib_malloc_pages(substream, - params_buffer_bytes(hw_params)); -} - -static int snd_at73c213_pcm_hw_free(struct snd_pcm_substream *substream) -{ - return snd_pcm_lib_free_pages(substream); + return 0; } static int snd_at73c213_pcm_prepare(struct snd_pcm_substream *substream) @@ -322,9 +316,7 @@ snd_at73c213_pcm_pointer(struct snd_pcm_substream *substream) static const struct snd_pcm_ops at73c213_playback_ops = { .open = snd_at73c213_pcm_open, .close = snd_at73c213_pcm_close, - .ioctl = snd_pcm_lib_ioctl, .hw_params = snd_at73c213_pcm_hw_params, - .hw_free = snd_at73c213_pcm_hw_free, .prepare = snd_at73c213_pcm_prepare, .trigger = snd_at73c213_pcm_trigger, .pointer = snd_at73c213_pcm_pointer, @@ -347,7 +339,7 @@ static int snd_at73c213_pcm_new(struct snd_at73c213 *chip, int device) snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &at73c213_playback_ops); - snd_pcm_lib_preallocate_pages_for_all(chip->pcm, + snd_pcm_set_managed_buffer_all(chip->pcm, SNDRV_DMA_TYPE_DEV, &chip->ssc->pdev->dev, 64 * 1024, 64 * 1024); out: @@ -665,7 +657,7 @@ static int snd_at73c213_aux_capture_volume_info( | (mask << 24) | (invert << 22)) \ } -static struct snd_kcontrol_new snd_at73c213_controls[] = { +static const struct snd_kcontrol_new snd_at73c213_controls[] = { AT73C213_STEREO("Master Playback Volume", 0, DAC_LMPG, DAC_RMPG, 0, 0, 0x1f, 1), AT73C213_STEREO("Master Playback Switch", 0, DAC_LMPG, DAC_RMPG, 5, 5, 1, 1), AT73C213_STEREO("PCM Playback Volume", 0, DAC_LLOG, DAC_RLOG, 0, 0, 0x1f, 1), @@ -882,7 +874,7 @@ static int snd_at73c213_dev_free(struct snd_device *device) static int snd_at73c213_dev_init(struct snd_card *card, struct spi_device *spi) { - static struct snd_device_ops ops = { + static const struct snd_device_ops ops = { .dev_free = snd_at73c213_dev_free, }; struct snd_at73c213 *chip = get_chip(card); |