Path: blob/master/sound/soc/blackfin/bf5xx-ad1980.c
10817 views
/*1* File: sound/soc/blackfin/bf5xx-ad1980.c2* Author: Cliff Cai <[email protected]>3*4* Created: Tue June 06 20085* Description: Board driver for AD1980/1 audio codec6*7* Modified:8* Copyright 2008 Analog Devices Inc.9*10* Bugs: Enter bugs at http://blackfin.uclinux.org/11*12* This program is free software; you can redistribute it and/or modify13* it under the terms of the GNU General Public License as published by14* the Free Software Foundation; either version 2 of the License, or15* (at your option) any later version.16*17* This program is distributed in the hope that it will be useful,18* but WITHOUT ANY WARRANTY; without even the implied warranty of19* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20* GNU General Public License for more details.21*22* You should have received a copy of the GNU General Public License23* along with this program; if not, see the file COPYING, or write24* to the Free Software Foundation, Inc.,25* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA26*/2728/*29* WARNING:30*31* Because Analog Devices Inc. discontinued the ad1980 sound chip since32* Sep. 2009, this ad1980 driver is not maintained, tested and supported33* by ADI now.34*/3536#include <linux/module.h>37#include <linux/moduleparam.h>38#include <linux/device.h>39#include <asm/dma.h>4041#include <sound/core.h>42#include <sound/pcm.h>43#include <sound/soc.h>4445#include <linux/gpio.h>46#include <asm/portmux.h>4748#include "../codecs/ad1980.h"4950#include "bf5xx-ac97-pcm.h"51#include "bf5xx-ac97.h"5253static struct snd_soc_card bf5xx_board;5455static struct snd_soc_dai_link bf5xx_board_dai[] = {56{57.name = "AC97",58.stream_name = "AC97 HiFi",59.cpu_dai_name = "bfin-ac97.0",60.codec_dai_name = "ad1980-hifi",61.platform_name = "bfin-ac97-pcm-audio",62.codec_name = "ad1980",63},64{65.name = "AC97",66.stream_name = "AC97 HiFi",67.cpu_dai_name = "bfin-ac97.1",68.codec_dai_name = "ad1980-hifi",69.platform_name = "bfin-ac97-pcm-audio",70.codec_name = "ad1980",71},72};7374static struct snd_soc_card bf5xx_board = {75.name = "bfin-ad1980",76.dai_link = &bf5xx_board_dai[CONFIG_SND_BF5XX_SPORT_NUM],77.num_links = 1,78};7980static struct platform_device *bf5xx_board_snd_device;8182static int __init bf5xx_board_init(void)83{84int ret;8586bf5xx_board_snd_device = platform_device_alloc("soc-audio", -1);87if (!bf5xx_board_snd_device)88return -ENOMEM;8990platform_set_drvdata(bf5xx_board_snd_device, &bf5xx_board);91ret = platform_device_add(bf5xx_board_snd_device);9293if (ret)94platform_device_put(bf5xx_board_snd_device);9596return ret;97}9899static void __exit bf5xx_board_exit(void)100{101platform_device_unregister(bf5xx_board_snd_device);102}103104module_init(bf5xx_board_init);105module_exit(bf5xx_board_exit);106107/* Module information */108MODULE_AUTHOR("Cliff Cai");109MODULE_DESCRIPTION("ALSA SoC AD1980/1 BF5xx board (Obsolete)");110MODULE_LICENSE("GPL");111112113