mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge branch 'fix/asoc' into for-linus
This commit is contained in:
commit
69dbdd8195
9802 changed files with 963759 additions and 504242 deletions
|
|
@ -395,12 +395,10 @@ int snd_card_disconnect(struct snd_card *card)
|
|||
snd_printk(KERN_ERR "not all devices for card %i can be disconnected\n", card->number);
|
||||
|
||||
snd_info_card_disconnect(card);
|
||||
#ifndef CONFIG_SYSFS_DEPRECATED
|
||||
if (card->card_dev) {
|
||||
device_unregister(card->card_dev);
|
||||
card->card_dev = NULL;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_PM
|
||||
wake_up(&card->power_sleep);
|
||||
#endif
|
||||
|
|
@ -573,7 +571,6 @@ void snd_card_set_id(struct snd_card *card, const char *nid)
|
|||
}
|
||||
EXPORT_SYMBOL(snd_card_set_id);
|
||||
|
||||
#ifndef CONFIG_SYSFS_DEPRECATED
|
||||
static ssize_t
|
||||
card_id_show_attr(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
|
|
@ -635,7 +632,6 @@ card_number_show_attr(struct device *dev,
|
|||
|
||||
static struct device_attribute card_number_attrs =
|
||||
__ATTR(number, S_IRUGO, card_number_show_attr, NULL);
|
||||
#endif /* CONFIG_SYSFS_DEPRECATED */
|
||||
|
||||
/**
|
||||
* snd_card_register - register the soundcard
|
||||
|
|
@ -654,7 +650,7 @@ int snd_card_register(struct snd_card *card)
|
|||
|
||||
if (snd_BUG_ON(!card))
|
||||
return -EINVAL;
|
||||
#ifndef CONFIG_SYSFS_DEPRECATED
|
||||
|
||||
if (!card->card_dev) {
|
||||
card->card_dev = device_create(sound_class, card->dev,
|
||||
MKDEV(0, 0), card,
|
||||
|
|
@ -662,7 +658,7 @@ int snd_card_register(struct snd_card *card)
|
|||
if (IS_ERR(card->card_dev))
|
||||
card->card_dev = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((err = snd_device_register_all(card)) < 0)
|
||||
return err;
|
||||
mutex_lock(&snd_card_mutex);
|
||||
|
|
@ -679,7 +675,6 @@ int snd_card_register(struct snd_card *card)
|
|||
if (snd_mixer_oss_notify_callback)
|
||||
snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_REGISTER);
|
||||
#endif
|
||||
#ifndef CONFIG_SYSFS_DEPRECATED
|
||||
if (card->card_dev) {
|
||||
err = device_create_file(card->card_dev, &card_id_attrs);
|
||||
if (err < 0)
|
||||
|
|
@ -688,7 +683,7 @@ int snd_card_register(struct snd_card *card)
|
|||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ static const struct file_operations seq_oss_f_ops =
|
|||
.poll = odev_poll,
|
||||
.unlocked_ioctl = odev_ioctl,
|
||||
.compat_ioctl = odev_ioctl_compat,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
static int __init
|
||||
|
|
|
|||
|
|
@ -184,7 +184,8 @@ static int snd_open(struct inode *inode, struct file *file)
|
|||
static const struct file_operations snd_fops =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.open = snd_open
|
||||
.open = snd_open,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SND_DYNAMIC_MINORS
|
||||
|
|
|
|||
|
|
@ -21,11 +21,8 @@
|
|||
*
|
||||
**************************************************************************
|
||||
*
|
||||
* The Intel Audio Codec '97 specification is available at the Intel
|
||||
* audio homepage: http://developer.intel.com/ial/scalableplatforms/audio/
|
||||
*
|
||||
* The specification itself is currently available at:
|
||||
* ftp://download.intel.com/ial/scalableplatforms/ac97r22.pdf
|
||||
* The Intel Audio Codec '97 specification is available at:
|
||||
* http://download.intel.com/support/motherboards/desktop/sb/ac97_r23.pdf
|
||||
*
|
||||
**************************************************************************
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1118,6 +1118,7 @@ static const struct file_operations dev_fileops = {
|
|||
.unlocked_ioctl = dev_ioctl,
|
||||
.open = dev_open,
|
||||
.release = dev_release,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
static int reset_dsp(void)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
/* Power-Management-Code ( CONFIG_PM )
|
||||
* for ens1371 only ( FIXME )
|
||||
* derived from cs4281.c, atiixp.c and via82xx.c
|
||||
* using http://www.alsa-project.org/~iwai/writing-an-alsa-driver/c1540.htm
|
||||
* using http://www.alsa-project.org/~tiwai/writing-an-alsa-driver/
|
||||
* by Kurt J. Bosch
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -716,7 +716,7 @@ static void snd_intel8x0_setup_periods(struct intel8x0 *chip, struct ichdev *ich
|
|||
* Intel 82443MX running a 100MHz processor system bus has a hardware bug,
|
||||
* which aborts PCI busmaster for audio transfer. A workaround is to set
|
||||
* the pages as non-cached. For details, see the errata in
|
||||
* http://www.intel.com/design/chipsets/specupdt/245051.htm
|
||||
* http://download.intel.com/design/chipsets/specupdt/24505108.pdf
|
||||
*/
|
||||
static void fill_nocache(void *buf, int size, int nocache)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -142,10 +142,9 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
|
|||
link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
|
||||
link->resource[0]->end = 16;
|
||||
|
||||
link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
|
||||
link->conf.IntType = INT_MEMORY_AND_IO;
|
||||
link->conf.ConfigIndex = 1;
|
||||
link->conf.Present = PRESENT_OPTION;
|
||||
link->config_flags = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
|
||||
link->config_index = 1;
|
||||
link->config_regs = PRESENT_OPTION;
|
||||
|
||||
return pdacf_config(link);
|
||||
}
|
||||
|
|
@ -217,7 +216,8 @@ static int pdacf_config(struct pcmcia_device *link)
|
|||
int ret;
|
||||
|
||||
snd_printdd(KERN_DEBUG "pdacf_config called\n");
|
||||
link->conf.ConfigIndex = 0x5;
|
||||
link->config_index = 0x5;
|
||||
link->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
|
||||
|
||||
ret = pcmcia_request_io(link);
|
||||
if (ret)
|
||||
|
|
@ -227,7 +227,7 @@ static int pdacf_config(struct pcmcia_device *link)
|
|||
if (ret)
|
||||
goto failed;
|
||||
|
||||
ret = pcmcia_request_configuration(link, &link->conf);
|
||||
ret = pcmcia_enable_device(link);
|
||||
if (ret)
|
||||
goto failed;
|
||||
|
||||
|
|
@ -287,9 +287,7 @@ MODULE_DEVICE_TABLE(pcmcia, snd_pdacf_ids);
|
|||
|
||||
static struct pcmcia_driver pdacf_cs_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.drv = {
|
||||
.name = "snd-pdaudiocf",
|
||||
},
|
||||
.name = "snd-pdaudiocf",
|
||||
.probe = snd_pdacf_probe,
|
||||
.remove = snd_pdacf_detach,
|
||||
.id_table = snd_pdacf_ids,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include <sound/pcm.h>
|
||||
#include <asm/io.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <pcmcia/cs.h>
|
||||
#include <pcmcia/cistpl.h>
|
||||
#include <pcmcia/ds.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Driver for Digigram VXpocket V2/440 soundcards
|
||||
*
|
||||
* Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
|
|
@ -162,10 +162,9 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl,
|
|||
link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
|
||||
link->resource[0]->end = 16;
|
||||
|
||||
link->conf.Attributes = CONF_ENABLE_IRQ;
|
||||
link->conf.IntType = INT_MEMORY_AND_IO;
|
||||
link->conf.ConfigIndex = 1;
|
||||
link->conf.Present = PRESENT_OPTION;
|
||||
link->config_flags |= CONF_ENABLE_IRQ;
|
||||
link->config_index = 1;
|
||||
link->config_regs = PRESENT_OPTION;
|
||||
|
||||
*chip_ret = vxp;
|
||||
return 0;
|
||||
|
|
@ -234,7 +233,7 @@ static int vxpocket_config(struct pcmcia_device *link)
|
|||
if (ret)
|
||||
goto failed;
|
||||
|
||||
ret = pcmcia_request_configuration(link, &link->conf);
|
||||
ret = pcmcia_enable_device(link);
|
||||
if (ret)
|
||||
goto failed;
|
||||
|
||||
|
|
@ -359,9 +358,7 @@ MODULE_DEVICE_TABLE(pcmcia, vxp_ids);
|
|||
|
||||
static struct pcmcia_driver vxp_cs_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.drv = {
|
||||
.name = "snd-vxpocket",
|
||||
},
|
||||
.name = "snd-vxpocket",
|
||||
.probe = vxpocket_probe,
|
||||
.remove = vxpocket_detach,
|
||||
.id_table = vxp_ids,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include <sound/vx_core.h>
|
||||
|
||||
#include <pcmcia/cs.h>
|
||||
#include <pcmcia/cistpl.h>
|
||||
#include <pcmcia/ds.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ static void spu_reset(void)
|
|||
spu_memset(0, 0, 0x200000 / 4);
|
||||
/* Put ARM7 in endless loop */
|
||||
local_irq_save(flags);
|
||||
ctrl_outl(0xea000002, SPU_MEMORY_BASE);
|
||||
__raw_writel(0xea000002, SPU_MEMORY_BASE);
|
||||
local_irq_restore(flags);
|
||||
spu_enable();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,9 @@ config SND_SOC_ALL_CODECS
|
|||
select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC
|
||||
select SND_SOC_CS42L51 if I2C
|
||||
select SND_SOC_CS4270 if I2C
|
||||
select SND_SOC_CX20442
|
||||
select SND_SOC_DA7210 if I2C
|
||||
select SND_SOC_JZ4740 if SOC_JZ4740
|
||||
select SND_SOC_JZ4740_CODEC if SOC_JZ4740
|
||||
select SND_SOC_MAX98088 if I2C
|
||||
select SND_SOC_MAX9877 if I2C
|
||||
select SND_SOC_PCM3008
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
(1000000000 / ((rate * 1000) / samples))
|
||||
|
||||
#define US_TO_SAMPLES(rate, us) \
|
||||
(rate / (1000000 / us))
|
||||
(rate / (1000000 / (us < 1000000 ? us : 1000000)))
|
||||
|
||||
#define UTHR_FROM_PERIOD_SIZE(samples, playrate, burstrate) \
|
||||
((samples * 5000) / ((burstrate * 5000) / (burstrate - playrate)))
|
||||
|
|
@ -200,7 +200,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg,
|
|||
u8 *value)
|
||||
{
|
||||
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
|
||||
int val;
|
||||
int val, ret = 0;
|
||||
|
||||
*value = reg & 0xff;
|
||||
|
||||
|
|
@ -210,6 +210,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg,
|
|||
if (val < 0) {
|
||||
dev_err(codec->dev, "Read failed (%d)\n", val);
|
||||
value[0] = dac33_read_reg_cache(codec, reg);
|
||||
ret = val;
|
||||
} else {
|
||||
value[0] = val;
|
||||
dac33_write_reg_cache(codec, reg, val);
|
||||
|
|
@ -218,7 +219,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg,
|
|||
value[0] = dac33_read_reg_cache(codec, reg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int dac33_write(struct snd_soc_codec *codec, unsigned int reg,
|
||||
|
|
@ -329,13 +330,18 @@ static void dac33_init_chip(struct snd_soc_codec *codec)
|
|||
dac33_read_reg_cache(codec, DAC33_LINER_TO_RLO_VOL));
|
||||
}
|
||||
|
||||
static inline void dac33_read_id(struct snd_soc_codec *codec)
|
||||
static inline int dac33_read_id(struct snd_soc_codec *codec)
|
||||
{
|
||||
int i, ret = 0;
|
||||
u8 reg;
|
||||
|
||||
dac33_read(codec, DAC33_DEVICE_ID_MSB, ®);
|
||||
dac33_read(codec, DAC33_DEVICE_ID_LSB, ®);
|
||||
dac33_read(codec, DAC33_DEVICE_REV_ID, ®);
|
||||
for (i = 0; i < 3; i++) {
|
||||
ret = dac33_read(codec, DAC33_DEVICE_ID_MSB + i, ®);
|
||||
if (ret < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void dac33_soft_power(struct snd_soc_codec *codec, int power)
|
||||
|
|
@ -1076,6 +1082,9 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream)
|
|||
/* Number of samples under i2c latency */
|
||||
dac33->alarm_threshold = US_TO_SAMPLES(rate,
|
||||
dac33->mode1_latency);
|
||||
nsample_limit = DAC33_BUFFER_SIZE_SAMPLES -
|
||||
dac33->alarm_threshold;
|
||||
|
||||
if (dac33->auto_fifo_config) {
|
||||
if (period_size <= dac33->alarm_threshold)
|
||||
/*
|
||||
|
|
@ -1086,6 +1095,8 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream)
|
|||
((dac33->alarm_threshold / period_size) +
|
||||
(dac33->alarm_threshold % period_size ?
|
||||
1 : 0));
|
||||
else if (period_size > nsample_limit)
|
||||
dac33->nsample = nsample_limit;
|
||||
else
|
||||
dac33->nsample = period_size;
|
||||
} else {
|
||||
|
|
@ -1097,8 +1108,7 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream)
|
|||
*/
|
||||
dac33->nsample_max = substream->runtime->buffer_size -
|
||||
period_size;
|
||||
nsample_limit = DAC33_BUFFER_SIZE_SAMPLES -
|
||||
dac33->alarm_threshold;
|
||||
|
||||
if (dac33->nsample_max > nsample_limit)
|
||||
dac33->nsample_max = nsample_limit;
|
||||
|
||||
|
|
@ -1414,9 +1424,15 @@ static int dac33_soc_probe(struct snd_soc_codec *codec)
|
|||
dev_err(codec->dev, "Failed to power up codec: %d\n", ret);
|
||||
goto err_power;
|
||||
}
|
||||
dac33_read_id(codec);
|
||||
ret = dac33_read_id(codec);
|
||||
dac33_hard_power(codec, 0);
|
||||
|
||||
if (ret < 0) {
|
||||
dev_err(codec->dev, "Failed to read chip ID: %d\n", ret);
|
||||
ret = -ENODEV;
|
||||
goto err_power;
|
||||
}
|
||||
|
||||
/* Check if the IRQ number is valid and request it */
|
||||
if (dac33->irq >= 0) {
|
||||
ret = request_irq(dac33->irq, dac33_interrupt_handler,
|
||||
|
|
|
|||
|
|
@ -119,13 +119,13 @@ static int tpa6130a2_power(int power)
|
|||
{
|
||||
struct tpa6130a2_data *data;
|
||||
u8 val;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
BUG_ON(tpa6130a2_client == NULL);
|
||||
data = i2c_get_clientdata(tpa6130a2_client);
|
||||
|
||||
mutex_lock(&data->mutex);
|
||||
if (power) {
|
||||
if (power && !data->power_state) {
|
||||
/* Power on */
|
||||
if (data->power_gpio >= 0)
|
||||
gpio_set_value(data->power_gpio, 1);
|
||||
|
|
@ -153,7 +153,7 @@ static int tpa6130a2_power(int power)
|
|||
val = tpa6130a2_read(TPA6130A2_REG_CONTROL);
|
||||
val &= ~TPA6130A2_SWS;
|
||||
tpa6130a2_i2c_write(TPA6130A2_REG_CONTROL, val);
|
||||
} else {
|
||||
} else if (!power && data->power_state) {
|
||||
/* set SWS */
|
||||
val = tpa6130a2_read(TPA6130A2_REG_CONTROL);
|
||||
val |= TPA6130A2_SWS;
|
||||
|
|
|
|||
|
|
@ -186,7 +186,6 @@ static int wm8900_volatile_register(unsigned int reg)
|
|||
{
|
||||
switch (reg) {
|
||||
case WM8900_REG_ID:
|
||||
case WM8900_REG_POWER1:
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
|
|
@ -1200,11 +1199,6 @@ static int wm8900_probe(struct snd_soc_codec *codec)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Read back from the chip */
|
||||
reg = snd_soc_read(codec, WM8900_REG_POWER1);
|
||||
reg = (reg >> 12) & 0xf;
|
||||
dev_info(codec->dev, "WM8900 revision %d\n", reg);
|
||||
|
||||
wm8900_reset(codec);
|
||||
|
||||
/* Turn the chip on */
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec)
|
|||
reg_r = reg & WM8993_DCS_DAC_WR_VAL_0_MASK;
|
||||
break;
|
||||
default:
|
||||
WARN(1, "Unknown DCS readback method");
|
||||
WARN(1, "Unknown DCS readback method\n");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include <sound/initval.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
#include <plat/control.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/mcbsp.h>
|
||||
#include "omap-mcbsp.h"
|
||||
|
|
@ -598,93 +597,6 @@ static int omap_mcbsp_dai_set_clkdiv(struct snd_soc_dai *cpu_dai,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int omap_mcbsp_dai_set_clks_src(struct omap_mcbsp_data *mcbsp_data,
|
||||
int clk_id)
|
||||
{
|
||||
int sel_bit;
|
||||
u16 reg, reg_devconf1 = OMAP243X_CONTROL_DEVCONF1;
|
||||
|
||||
if (cpu_class_is_omap1()) {
|
||||
/* OMAP1's can use only external source clock */
|
||||
if (unlikely(clk_id == OMAP_MCBSP_SYSCLK_CLKS_FCLK))
|
||||
return -EINVAL;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cpu_is_omap2420() && mcbsp_data->bus_id > 1)
|
||||
return -EINVAL;
|
||||
|
||||
if (cpu_is_omap343x())
|
||||
reg_devconf1 = OMAP343X_CONTROL_DEVCONF1;
|
||||
|
||||
switch (mcbsp_data->bus_id) {
|
||||
case 0:
|
||||
reg = OMAP2_CONTROL_DEVCONF0;
|
||||
sel_bit = 2;
|
||||
break;
|
||||
case 1:
|
||||
reg = OMAP2_CONTROL_DEVCONF0;
|
||||
sel_bit = 6;
|
||||
break;
|
||||
case 2:
|
||||
reg = reg_devconf1;
|
||||
sel_bit = 0;
|
||||
break;
|
||||
case 3:
|
||||
reg = reg_devconf1;
|
||||
sel_bit = 2;
|
||||
break;
|
||||
case 4:
|
||||
reg = reg_devconf1;
|
||||
sel_bit = 4;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (clk_id == OMAP_MCBSP_SYSCLK_CLKS_FCLK)
|
||||
omap_ctrl_writel(omap_ctrl_readl(reg) & ~(1 << sel_bit), reg);
|
||||
else
|
||||
omap_ctrl_writel(omap_ctrl_readl(reg) | (1 << sel_bit), reg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int omap_mcbsp_dai_set_rcvr_src(struct omap_mcbsp_data *mcbsp_data,
|
||||
int clk_id)
|
||||
{
|
||||
int sel_bit, set = 0;
|
||||
u16 reg = OMAP2_CONTROL_DEVCONF0;
|
||||
|
||||
if (cpu_class_is_omap1())
|
||||
return -EINVAL; /* TODO: Can this be implemented for OMAP1? */
|
||||
if (mcbsp_data->bus_id != 0)
|
||||
return -EINVAL;
|
||||
|
||||
switch (clk_id) {
|
||||
case OMAP_MCBSP_CLKR_SRC_CLKX:
|
||||
set = 1;
|
||||
case OMAP_MCBSP_CLKR_SRC_CLKR:
|
||||
sel_bit = 3;
|
||||
break;
|
||||
case OMAP_MCBSP_FSR_SRC_FSX:
|
||||
set = 1;
|
||||
case OMAP_MCBSP_FSR_SRC_FSR:
|
||||
sel_bit = 4;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (set)
|
||||
omap_ctrl_writel(omap_ctrl_readl(reg) | (1 << sel_bit), reg);
|
||||
else
|
||||
omap_ctrl_writel(omap_ctrl_readl(reg) & ~(1 << sel_bit), reg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
|
||||
int clk_id, unsigned int freq,
|
||||
int dir)
|
||||
|
|
@ -693,6 +605,14 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
|
|||
struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs;
|
||||
int err = 0;
|
||||
|
||||
/* The McBSP signal muxing functions are only available on McBSP1 */
|
||||
if (clk_id == OMAP_MCBSP_CLKR_SRC_CLKR ||
|
||||
clk_id == OMAP_MCBSP_CLKR_SRC_CLKX ||
|
||||
clk_id == OMAP_MCBSP_FSR_SRC_FSR ||
|
||||
clk_id == OMAP_MCBSP_FSR_SRC_FSX)
|
||||
if (cpu_class_is_omap1() || mcbsp_data->bus_id != 0)
|
||||
return -EINVAL;
|
||||
|
||||
mcbsp_data->in_freq = freq;
|
||||
|
||||
switch (clk_id) {
|
||||
|
|
@ -700,8 +620,20 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
|
|||
regs->srgr2 |= CLKSM;
|
||||
break;
|
||||
case OMAP_MCBSP_SYSCLK_CLKS_FCLK:
|
||||
if (cpu_class_is_omap1()) {
|
||||
err = -EINVAL;
|
||||
break;
|
||||
}
|
||||
err = omap2_mcbsp_set_clks_src(mcbsp_data->bus_id,
|
||||
MCBSP_CLKS_PRCM_SRC);
|
||||
break;
|
||||
case OMAP_MCBSP_SYSCLK_CLKS_EXT:
|
||||
err = omap_mcbsp_dai_set_clks_src(mcbsp_data, clk_id);
|
||||
if (cpu_class_is_omap1()) {
|
||||
err = 0;
|
||||
break;
|
||||
}
|
||||
err = omap2_mcbsp_set_clks_src(mcbsp_data->bus_id,
|
||||
MCBSP_CLKS_PAD_SRC);
|
||||
break;
|
||||
|
||||
case OMAP_MCBSP_SYSCLK_CLKX_EXT:
|
||||
|
|
@ -710,11 +642,18 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
|
|||
regs->pcr0 |= SCLKME;
|
||||
break;
|
||||
|
||||
|
||||
case OMAP_MCBSP_CLKR_SRC_CLKR:
|
||||
omap2_mcbsp1_mux_clkr_src(CLKR_SRC_CLKR);
|
||||
break;
|
||||
case OMAP_MCBSP_CLKR_SRC_CLKX:
|
||||
omap2_mcbsp1_mux_clkr_src(CLKR_SRC_CLKX);
|
||||
break;
|
||||
case OMAP_MCBSP_FSR_SRC_FSR:
|
||||
omap2_mcbsp1_mux_fsr_src(FSR_SRC_FSR);
|
||||
break;
|
||||
case OMAP_MCBSP_FSR_SRC_FSX:
|
||||
err = omap_mcbsp_dai_set_rcvr_src(mcbsp_data, clk_id);
|
||||
omap2_mcbsp1_mux_fsr_src(FSR_SRC_FSX);
|
||||
break;
|
||||
default:
|
||||
err = -ENODEV;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
#include <sound/initval.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
#include <plat/control.h>
|
||||
#include <plat/dma.h>
|
||||
#include <plat/mcbsp.h>
|
||||
#include "mcpdm.h"
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ static void tosa_ext_control(struct snd_soc_codec *codec)
|
|||
static int tosa_startup(struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_codec *codec = rtd->card->codec;
|
||||
struct snd_soc_codec *codec = rtd->codec;
|
||||
|
||||
/* check the jack status at stream startup */
|
||||
tosa_ext_control(codec);
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ static int __init sh7760_ac97_init(void)
|
|||
unsigned short ipsel;
|
||||
|
||||
/* enable both AC97 controllers in pinmux reg */
|
||||
ipsel = ctrl_inw(IPSEL);
|
||||
ctrl_outw(ipsel | (3 << 10), IPSEL);
|
||||
ipsel = __raw_readw(IPSEL);
|
||||
__raw_writew(ipsel | (3 << 10), IPSEL);
|
||||
|
||||
ret = -ENOMEM;
|
||||
sh7760_ac97_snd_device = platform_device_alloc("soc-audio", -1);
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ static int siu_pcm_wr_set(struct siu_port *port_info,
|
|||
sg_init_table(&sg, 1);
|
||||
sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
|
||||
size, offset_in_page(buff));
|
||||
sg_dma_len(&sg) = size;
|
||||
sg_dma_address(&sg) = buff;
|
||||
|
||||
desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,
|
||||
|
|
@ -176,6 +177,7 @@ static int siu_pcm_rd_set(struct siu_port *port_info,
|
|||
sg_init_table(&sg, 1);
|
||||
sg_set_page(&sg, pfn_to_page(PFN_DOWN(buff)),
|
||||
size, offset_in_page(buff));
|
||||
sg_dma_len(&sg) = size;
|
||||
sg_dma_address(&sg) = buff;
|
||||
|
||||
desc = siu_stream->chan->device->device_prep_slave_sg(siu_stream->chan,
|
||||
|
|
|
|||
|
|
@ -165,8 +165,11 @@ static ssize_t pmdown_time_set(struct device *dev,
|
|||
{
|
||||
struct snd_soc_pcm_runtime *rtd =
|
||||
container_of(dev, struct snd_soc_pcm_runtime, dev);
|
||||
int ret;
|
||||
|
||||
strict_strtol(buf, 10, &rtd->pmdown_time);
|
||||
ret = strict_strtol(buf, 10, &rtd->pmdown_time);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
|
@ -230,6 +233,7 @@ static const struct file_operations codec_reg_fops = {
|
|||
.open = codec_reg_open_file,
|
||||
.read = codec_reg_read_file,
|
||||
.write = codec_reg_write_file,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
|
||||
|
|
|
|||
|
|
@ -1084,6 +1084,7 @@ static ssize_t dapm_widget_power_read_file(struct file *file,
|
|||
static const struct file_operations dapm_widget_power_fops = {
|
||||
.open = dapm_widget_power_open_file,
|
||||
.read = dapm_widget_power_read_file,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
void snd_soc_dapm_debugfs_init(struct snd_soc_codec *codec)
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ static const struct file_operations soundcore_fops =
|
|||
/* We must have an owner or the module locking fails */
|
||||
.owner = THIS_MODULE,
|
||||
.open = soundcore_open,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue