wm9712.c (6627a653bceb3a54e55e5cdc478ec5b8d5c9cc44) wm9712.c (6335d05548eece40092000aa91b64a50310d69d5)
1/*
2 * wm9712.c -- ALSA Soc WM9712 codec support
3 *
4 * Copyright 2006 Wolfson Microelectronics PLC.
5 * Author: Liam Girdwood <lrg@slimlogic.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 503 unchanged lines hidden (view full) ---

512
513 return ac97_write(codec, AC97_PCM_SURR_DAC_RATE, runtime->rate);
514}
515
516#define WM9712_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
517 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\
518 SNDRV_PCM_RATE_48000)
519
1/*
2 * wm9712.c -- ALSA Soc WM9712 codec support
3 *
4 * Copyright 2006 Wolfson Microelectronics PLC.
5 * Author: Liam Girdwood <lrg@slimlogic.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 503 unchanged lines hidden (view full) ---

512
513 return ac97_write(codec, AC97_PCM_SURR_DAC_RATE, runtime->rate);
514}
515
516#define WM9712_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
517 SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\
518 SNDRV_PCM_RATE_48000)
519
520static struct snd_soc_dai_ops wm9712_dai_ops_hifi = {
521 .prepare = ac97_prepare,
522};
523
524static struct snd_soc_dai_ops wm9712_dai_ops_aux = {
525 .prepare = ac97_aux_prepare,
526};
527
520struct snd_soc_dai wm9712_dai[] = {
521{
522 .name = "AC97 HiFi",
523 .ac97_control = 1,
524 .playback = {
525 .stream_name = "HiFi Playback",
526 .channels_min = 1,
527 .channels_max = 2,
528 .rates = WM9712_AC97_RATES,
529 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
530 .capture = {
531 .stream_name = "HiFi Capture",
532 .channels_min = 1,
533 .channels_max = 2,
534 .rates = WM9712_AC97_RATES,
535 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
528struct snd_soc_dai wm9712_dai[] = {
529{
530 .name = "AC97 HiFi",
531 .ac97_control = 1,
532 .playback = {
533 .stream_name = "HiFi Playback",
534 .channels_min = 1,
535 .channels_max = 2,
536 .rates = WM9712_AC97_RATES,
537 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
538 .capture = {
539 .stream_name = "HiFi Capture",
540 .channels_min = 1,
541 .channels_max = 2,
542 .rates = WM9712_AC97_RATES,
543 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
536 .ops = {
537 .prepare = ac97_prepare,},
544 .ops = &wm9712_dai_ops_hifi,
538},
539{
540 .name = "AC97 Aux",
541 .playback = {
542 .stream_name = "Aux Playback",
543 .channels_min = 1,
544 .channels_max = 1,
545 .rates = WM9712_AC97_RATES,
546 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
545},
546{
547 .name = "AC97 Aux",
548 .playback = {
549 .stream_name = "Aux Playback",
550 .channels_min = 1,
551 .channels_max = 1,
552 .rates = WM9712_AC97_RATES,
553 .formats = SNDRV_PCM_FMTBIT_S16_LE,},
547 .ops = {
548 .prepare = ac97_aux_prepare,},
554 .ops = &wm9712_dai_ops_aux,
549}
550};
551EXPORT_SYMBOL_GPL(wm9712_dai);
552
553static int wm9712_set_bias_level(struct snd_soc_codec *codec,
554 enum snd_soc_bias_level level)
555{
556 switch (level) {

--- 183 unchanged lines hidden ---
555}
556};
557EXPORT_SYMBOL_GPL(wm9712_dai);
558
559static int wm9712_set_bias_level(struct snd_soc_codec *codec,
560 enum snd_soc_bias_level level)
561{
562 switch (level) {

--- 183 unchanged lines hidden ---