Merge branch 'fix/hda' into topic/hda

This commit is contained in:
Takashi Iwai 2010-12-20 10:28:51 +01:00
commit 67c6dc4df1
39 changed files with 147 additions and 72 deletions

View File

@ -29,7 +29,7 @@ struct wm8994_ldo_pdata {
#define WM8994_CONFIGURE_GPIO 0x8000
#define WM8994_DRC_REGS 5
#define WM8994_EQ_REGS 19
#define WM8994_EQ_REGS 20
/**
* DRC configurations are specified with a label and a set of register

View File

@ -3097,8 +3097,7 @@ static const char *cxt5066_models[CXT5066_MODELS] = {
static struct snd_pci_quirk cxt5066_cfg_tbl[] = {
SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD),
SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO),
SND_PCI_QUIRK(0x1028, 0x02f5, "Dell",
CXT5066_DELL_LAPTOP),
SND_PCI_QUIRK(0x1028, 0x02f5, "Dell Vostro 320", CXT5066_IDEAPAD),
SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTRO),
SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD),
SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP),

View File

@ -10819,7 +10819,8 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->autocfg;
int i, err;
int i, err, type;
int type_idx = 0;
hda_nid_t nid;
for (i = 0; i < cfg->num_inputs; i++) {
@ -10828,9 +10829,15 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec)
nid = cfg->inputs[i].pin;
if (get_wcaps(codec, nid) & AC_WCAP_IN_AMP) {
char label[32];
type = cfg->inputs[i].type;
if (i > 0 && type == cfg->inputs[i - 1].type)
type_idx++;
else
type_idx = 0;
snprintf(label, sizeof(label), "%s Boost",
hda_get_autocfg_input_label(codec, cfg, i));
err = add_control(spec, ALC_CTL_WIDGET_VOL, label, 0,
err = add_control(spec, ALC_CTL_WIDGET_VOL, label,
type_idx,
HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT));
if (err < 0)
return err;
@ -14789,6 +14796,8 @@ static int alc269_resume(struct hda_codec *codec)
enum {
ALC269_FIXUP_SONY_VAIO,
ALC269_FIXUP_DELL_M101Z,
ALC269_FIXUP_SKU_IGNORE,
ALC269_FIXUP_ASUS_G73JW,
};
static const struct alc_fixup alc269_fixups[] = {
@ -14806,11 +14815,23 @@ static const struct alc_fixup alc269_fixups[] = {
{}
}
},
[ALC269_FIXUP_SKU_IGNORE] = {
.sku = ALC_FIXUP_SKU_IGNORE,
},
[ALC269_FIXUP_ASUS_G73JW] = {
.pins = (const struct alc_pincfg[]) {
{ 0x17, 0x99130111 }, /* subwoofer */
{ }
}
},
};
static struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
{}
};

View File

@ -222,9 +222,9 @@ static int __init at91sam9g20ek_init(void)
}
pllb = clk_get(NULL, "pllb");
if (IS_ERR(mclk)) {
if (IS_ERR(pllb)) {
printk(KERN_ERR "ASoC: Failed to get PLLB\n");
ret = PTR_ERR(mclk);
ret = PTR_ERR(pllb);
goto err_mclk;
}
ret = clk_set_parent(mclk, pllb);
@ -240,6 +240,7 @@ static int __init at91sam9g20ek_init(void)
if (!at91sam9g20ek_snd_device) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n");
ret = -ENOMEM;
goto err_mclk;
}
platform_set_drvdata(at91sam9g20ek_snd_device,
@ -248,11 +249,13 @@ static int __init at91sam9g20ek_init(void)
ret = platform_device_add(at91sam9g20ek_snd_device);
if (ret) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n");
platform_device_put(at91sam9g20ek_snd_device);
goto err_device_add;
}
return ret;
err_device_add:
platform_device_put(at91sam9g20ek_snd_device);
err_mclk:
clk_put(mclk);
mclk = NULL;

View File

@ -167,7 +167,6 @@ static int __init afeb9260_soc_init(void)
return 0;
err1:
platform_device_del(afeb9260_snd_device);
platform_device_put(afeb9260_snd_device);
return err;
}

View File

@ -2019,7 +2019,10 @@ err_access:
static int max98088_remove(struct snd_soc_codec *codec)
{
struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
max98088_set_bias_level(codec, SND_SOC_BIAS_OFF);
kfree(max98088->eq_texts);
return 0;
}

View File

@ -383,6 +383,7 @@ static struct snd_soc_codec_driver soc_codec_dev_stac9766 = {
.reg_cache_size = sizeof(stac9766_reg),
.reg_word_size = sizeof(u16),
.reg_cache_step = 2,
.reg_cache_default = stac9766_reg,
};
static __devinit int stac9766_probe(struct platform_device *pdev)

View File

@ -1176,7 +1176,7 @@ EXPORT_SYMBOL_GPL(aic3x_set_gpio);
int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio)
{
u8 reg = gpio ? AIC3X_GPIO2_REG : AIC3X_GPIO1_REG;
u8 val, bit = gpio ? 2: 1;
u8 val = 0, bit = gpio ? 2 : 1;
aic3x_read(codec, reg, &val);
return (val >> bit) & 1;
@ -1204,7 +1204,7 @@ EXPORT_SYMBOL_GPL(aic3x_set_headset_detection);
int aic3x_headset_detected(struct snd_soc_codec *codec)
{
u8 val;
u8 val = 0;
aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val);
return (val >> 4) & 1;
}
@ -1212,7 +1212,7 @@ EXPORT_SYMBOL_GPL(aic3x_headset_detected);
int aic3x_button_pressed(struct snd_soc_codec *codec)
{
u8 val;
u8 val = 0;
aic3x_read(codec, AIC3X_HEADSET_DETECT_CTRL_B, &val);
return (val >> 5) & 1;
}

View File

@ -78,8 +78,10 @@ static int tpa6130a2_i2c_write(int reg, u8 value)
if (data->power_state) {
val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value);
if (val < 0)
if (val < 0) {
dev_err(&tpa6130a2_client->dev, "Write failed\n");
return val;
}
}
/* Either powered on or off, we save the context */

View File

@ -146,7 +146,6 @@ static int wm8523_startup(struct snd_pcm_substream *substream,
return -EINVAL;
}
return 0;
snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE,
&wm8523->rate_constraint);

View File

@ -491,16 +491,16 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
paifa |= 0x8;
break;
case SNDRV_PCM_FORMAT_S20_3LE:
paifa |= 0x10;
paifa |= 0x0;
paifb |= WM8580_AIF_LENGTH_20;
break;
case SNDRV_PCM_FORMAT_S24_LE:
paifa |= 0x10;
paifa |= 0x0;
paifb |= WM8580_AIF_LENGTH_24;
break;
case SNDRV_PCM_FORMAT_S32_LE:
paifa |= 0x10;
paifb |= WM8580_AIF_LENGTH_24;
paifa |= 0x0;
paifb |= WM8580_AIF_LENGTH_32;
break;
default:
return -EINVAL;

View File

@ -526,7 +526,7 @@ static int wm8731_probe(struct snd_soc_codec *codec)
snd_soc_update_bits(codec, WM8731_RINVOL, 0x100, 0);
/* Disable bypass path by default */
snd_soc_update_bits(codec, WM8731_APANA, 0x4, 0);
snd_soc_update_bits(codec, WM8731_APANA, 0x8, 0);
snd_soc_add_controls(codec, wm8731_snd_controls,
ARRAY_SIZE(wm8731_snd_controls));

View File

@ -2498,6 +2498,8 @@ static int wm8904_remove(struct snd_soc_codec *codec)
wm8904_set_bias_level(codec, SND_SOC_BIAS_OFF);
regulator_bulk_free(ARRAY_SIZE(wm8904->supplies), wm8904->supplies);
kfree(wm8904->retune_mobile_texts);
kfree(wm8904->drc_texts);
return 0;
}

View File

@ -711,7 +711,7 @@ static int wm8961_hw_params(struct snd_pcm_substream *substream,
if (fs <= 24000)
reg |= WM8961_DACSLOPE;
else
reg &= WM8961_DACSLOPE;
reg &= ~WM8961_DACSLOPE;
snd_soc_write(codec, WM8961_ADC_DAC_CONTROL_2, reg);
return 0;
@ -736,7 +736,7 @@ static int wm8961_set_sysclk(struct snd_soc_dai *dai, int clk_id,
freq /= 2;
} else {
dev_dbg(codec->dev, "Using MCLK/1 for %dHz MCLK\n", freq);
reg &= WM8961_MCLKDIV;
reg &= ~WM8961_MCLKDIV;
}
snd_soc_write(codec, WM8961_CLOCKING1, reg);

View File

@ -3339,7 +3339,7 @@ static irqreturn_t wm8962_irq(int irq, void *data)
int mask;
int active;
mask = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2);
mask = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2_MASK);
active = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2);
active &= ~mask;

View File

@ -4061,6 +4061,8 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec)
wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC2_DET, wm8994);
wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_SHRT, wm8994);
wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_DET, wm8994);
kfree(wm8994->retune_mobile_texts);
kfree(wm8994->drc_texts);
kfree(wm8994);
return 0;
@ -4073,6 +4075,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8994 = {
.resume = wm8994_resume,
.read = wm8994_read,
.write = wm8994_write,
.readable_register = wm8994_readable,
.volatile_register = wm8994_volatile,
.set_bias_level = wm8994_set_bias_level,
};

View File

@ -293,7 +293,7 @@ SOC_DOUBLE_R("Speaker Switch",
SOC_DOUBLE_R("Speaker ZC Switch",
WM8993_SPEAKER_VOLUME_LEFT, WM8993_SPEAKER_VOLUME_RIGHT,
7, 1, 0),
SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 0, 3, 7, 0,
SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 3, 0, 7, 0,
spkboost_tlv),
SOC_ENUM("Speaker Reference", speaker_ref),
SOC_ENUM("Speaker Mode", speaker_mode),

View File

@ -247,7 +247,10 @@ fail:
static int davinci_vcif_remove(struct platform_device *pdev)
{
struct davinci_vcif_dev *davinci_vcif_dev = dev_get_drvdata(&pdev->dev);
snd_soc_unregister_dai(&pdev->dev);
kfree(davinci_vcif_dev);
return 0;
}

View File

@ -54,24 +54,26 @@ static int __init simone_init(void)
ret = platform_device_add(simone_snd_ac97_device);
if (ret)
goto fail;
goto fail1;
simone_snd_device = platform_device_alloc("soc-audio", -1);
if (!simone_snd_device) {
ret = -ENOMEM;
goto fail;
goto fail2;
}
platform_set_drvdata(simone_snd_device, &snd_soc_simone);
ret = platform_device_add(simone_snd_device);
if (ret) {
platform_device_put(simone_snd_device);
goto fail;
}
if (ret)
goto fail3;
return ret;
return 0;
fail:
fail3:
platform_device_put(simone_snd_device);
fail2:
platform_device_del(simone_snd_ac97_device);
fail1:
platform_device_put(simone_snd_ac97_device);
return ret;
}

View File

@ -76,6 +76,7 @@ static __init int efika_fabric_init(void)
rc = platform_device_add(pdev);
if (rc) {
pr_err("efika_fabric_init: platform_device_add() failed\n");
platform_device_put(pdev);
return -ENODEV;
}
return 0;

View File

@ -9,7 +9,6 @@
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/slab.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <sound/soc.h>

View File

@ -498,6 +498,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "platform device add failed\n");
goto error;
}
dev_set_drvdata(&pdev->dev, sound_device);
of_node_put(codec_np);

View File

@ -498,6 +498,7 @@ static int p1022_ds_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "platform device add failed\n");
goto error;
}
dev_set_drvdata(&pdev->dev, sound_device);
of_node_put(codec_np);

View File

@ -76,6 +76,7 @@ static __init int pcm030_fabric_init(void)
rc = platform_device_add(pdev);
if (rc) {
pr_err("pcm030_fabric_init: platform_device_add() failed\n");
platform_device_put(pdev);
return -ENODEV;
}
return 0;

View File

@ -679,8 +679,11 @@ static int imx_ssi_probe(struct platform_device *pdev)
}
ssi->soc_platform_pdev_fiq = platform_device_alloc("imx-fiq-pcm-audio", pdev->id);
if (!ssi->soc_platform_pdev_fiq)
if (!ssi->soc_platform_pdev_fiq) {
ret = -ENOMEM;
goto failed_pdev_fiq_alloc;
}
platform_set_drvdata(ssi->soc_platform_pdev_fiq, ssi);
ret = platform_device_add(ssi->soc_platform_pdev_fiq);
if (ret) {
@ -689,8 +692,11 @@ static int imx_ssi_probe(struct platform_device *pdev)
}
ssi->soc_platform_pdev = platform_device_alloc("imx-pcm-audio", pdev->id);
if (!ssi->soc_platform_pdev)
if (!ssi->soc_platform_pdev) {
ret = -ENOMEM;
goto failed_pdev_alloc;
}
platform_set_drvdata(ssi->soc_platform_pdev, ssi);
ret = platform_device_add(ssi->soc_platform_pdev);
if (ret) {
@ -703,6 +709,7 @@ static int imx_ssi_probe(struct platform_device *pdev)
failed_pdev_add:
platform_device_put(ssi->soc_platform_pdev);
failed_pdev_alloc:
platform_device_del(ssi->soc_platform_pdev_fiq);
failed_pdev_fiq_add:
platform_device_put(ssi->soc_platform_pdev_fiq);
failed_pdev_fiq_alloc:
@ -726,8 +733,8 @@ static int __devexit imx_ssi_remove(struct platform_device *pdev)
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct imx_ssi *ssi = platform_get_drvdata(pdev);
platform_device_del(ssi->soc_platform_pdev);
platform_device_put(ssi->soc_platform_pdev);
platform_device_unregister(ssi->soc_platform_pdev);
platform_device_unregister(ssi->soc_platform_pdev_fiq);
snd_soc_unregister_dai(&pdev->dev);

View File

@ -43,6 +43,7 @@ static struct snd_soc_card imx_phycore = {
.num_links = ARRAY_SIZE(imx_phycore_dai_ac97),
};
static struct platform_device *imx_phycore_snd_ac97_device;
static struct platform_device *imx_phycore_snd_device;
static int __init imx_phycore_init(void)
@ -53,29 +54,42 @@ static int __init imx_phycore_init(void)
/* return happy. We might run on a totally different machine */
return 0;
imx_phycore_snd_device = platform_device_alloc("soc-audio", -1);
if (!imx_phycore_snd_device)
imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1);
if (!imx_phycore_snd_ac97_device)
return -ENOMEM;
platform_set_drvdata(imx_phycore_snd_device, &imx_phycore);
ret = platform_device_add(imx_phycore_snd_device);
platform_set_drvdata(imx_phycore_snd_ac97_device, &imx_phycore);
ret = platform_device_add(imx_phycore_snd_ac97_device);
if (ret)
goto fail1;
imx_phycore_snd_device = platform_device_alloc("wm9712-codec", -1);
if (!imx_phycore_snd_device)
return -ENOMEM;
if (!imx_phycore_snd_device) {
ret = -ENOMEM;
goto fail2;
}
ret = platform_device_add(imx_phycore_snd_device);
if (ret) {
printk(KERN_ERR "ASoC: Platform device allocation failed\n");
platform_device_put(imx_phycore_snd_device);
goto fail3;
}
return 0;
fail3:
platform_device_put(imx_phycore_snd_device);
fail2:
platform_device_del(imx_phycore_snd_ac97_device);
fail1:
platform_device_put(imx_phycore_snd_ac97_device);
return ret;
}
static void __exit imx_phycore_exit(void)
{
platform_device_unregister(imx_phycore_snd_device);
platform_device_unregister(imx_phycore_snd_ac97_device);
}
late_initcall(imx_phycore_init);

View File

@ -49,7 +49,7 @@ static unsigned short nuc900_ac97_read(struct snd_ac97 *ac97,
mutex_lock(&ac97_mutex);
val = nuc900_checkready();
if (!!val) {
if (val) {
dev_err(nuc900_audio->dev, "AC97 codec is not ready\n");
goto out;
}
@ -102,7 +102,7 @@ static void nuc900_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
mutex_lock(&ac97_mutex);
tmp = nuc900_checkready();
if (!!tmp)
if (tmp)
dev_err(nuc900_audio->dev, "AC97 codec is not ready\n");
/* clear the R_WB bit and write register index */
@ -149,7 +149,7 @@ static void nuc900_ac97_warm_reset(struct snd_ac97 *ac97)
udelay(100);
val = nuc900_checkready();
if (!!val)
if (val)
dev_err(nuc900_audio->dev, "AC97 codec is not ready\n");
mutex_unlock(&ac97_mutex);
@ -263,8 +263,7 @@ static int nuc900_ac97_trigger(struct snd_pcm_substream *substream,
return ret;
}
static int nuc900_ac97_probe(struct platform_device *pdev,
struct snd_soc_dai *dai)
static int nuc900_ac97_probe(struct snd_soc_dai *dai)
{
struct nuc900_audio *nuc900_audio = nuc900_ac97_data;
unsigned long val;
@ -284,12 +283,12 @@ static int nuc900_ac97_probe(struct platform_device *pdev,
return 0;
}
static void nuc900_ac97_remove(struct platform_device *pdev,
struct snd_soc_dai *dai)
static int nuc900_ac97_remove(struct snd_soc_dai *dai)
{
struct nuc900_audio *nuc900_audio = nuc900_ac97_data;
clk_disable(nuc900_audio->clk);
return 0;
}
static struct snd_soc_dai_ops nuc900_ac97_dai_ops = {
@ -313,7 +312,7 @@ static struct snd_soc_dai_driver nuc900_ac97_dai = {
.channels_max = 2,
},
.ops = &nuc900_ac97_dai_ops,
}
};
static int __devinit nuc900_ac97_drvprobe(struct platform_device *pdev)
{
@ -384,7 +383,6 @@ out0:
static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev)
{
snd_soc_unregister_dai(&pdev->dev);
clk_put(nuc900_ac97_data->clk);
@ -392,6 +390,7 @@ static int __devexit nuc900_ac97_drvremove(struct platform_device *pdev)
release_mem_region(nuc900_ac97_data->res->start,
resource_size(nuc900_ac97_data->res));
kfree(nuc900_ac97_data);
nuc900_ac97_data = NULL;
return 0;

View File

@ -110,4 +110,6 @@ struct nuc900_audio {
};
extern struct nuc900_audio *nuc900_ac97_data;
#endif /*end _NUC900_AUDIO_H */

View File

@ -50,12 +50,12 @@ static int nuc900_dma_hw_params(struct snd_pcm_substream *substream,
unsigned long flags;
int ret = 0;
spin_lock_irqsave(&nuc900_audio->lock, flags);
ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
if (ret < 0)
return ret;
spin_lock_irqsave(&nuc900_audio->lock, flags);
nuc900_audio->substream = substream;
nuc900_audio->dma_addr[substream->stream] = runtime->dma_addr;
nuc900_audio->buffersize[substream->stream] =
@ -169,6 +169,7 @@ static int nuc900_dma_prepare(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct nuc900_audio *nuc900_audio = runtime->private_data;
unsigned long flags, val;
int ret = 0;
spin_lock_irqsave(&nuc900_audio->lock, flags);
@ -197,10 +198,10 @@ static int nuc900_dma_prepare(struct snd_pcm_substream *substream)
AUDIO_WRITE(nuc900_audio->mmio + ACTL_RESET, val);
break;
default:
return -EINVAL;
ret = -EINVAL;
}
spin_unlock_irqrestore(&nuc900_audio->lock, flags);
return 0;
return ret;
}
static int nuc900_dma_trigger(struct snd_pcm_substream *substream, int cmd)
@ -332,7 +333,7 @@ static struct snd_soc_platform_driver nuc900_soc_platform = {
.ops = &nuc900_dma_ops,
.pcm_new = nuc900_dma_new,
.pcm_free = nuc900_dma_free_dma_buffers,
}
};
static int __devinit nuc900_soc_platform_probe(struct platform_device *pdev)
{

View File

@ -12,8 +12,8 @@ config SND_OMAP_SOC_MCPDM
config SND_OMAP_SOC_N810
tristate "SoC Audio support for Nokia N810"
depends on SND_OMAP_SOC && MACH_NOKIA_N810 && I2C
depends on OMAP_MUX
select SND_OMAP_SOC_MCBSP
select OMAP_MUX
select SND_SOC_TLV320AIC3X
help
Say Y if you want to add support for SoC audio on Nokia N810.

View File

@ -306,6 +306,7 @@ static int __init omap3pandora_soc_init(void)
pr_err(PREFIX "Failed to get DAC regulator from %s: %ld\n",
dev_name(&omap3pandora_snd_device->dev),
PTR_ERR(omap3pandora_dac_reg));
ret = PTR_ERR(omap3pandora_dac_reg);
goto fail3;
}

View File

@ -177,7 +177,8 @@ static int __init osk_soc_init(void)
tlv320aic23_mclk = clk_get(dev, "mclk");
if (IS_ERR(tlv320aic23_mclk)) {
printk(KERN_ERR "Could not get mclk clock\n");
return -ENODEV;
err = PTR_ERR(tlv320aic23_mclk);
goto err2;
}
/*
@ -188,7 +189,7 @@ static int __init osk_soc_init(void)
if (clk_set_rate(tlv320aic23_mclk, CODEC_CLOCK)) {
printk(KERN_ERR "Cannot set MCLK for AIC23 CODEC\n");
err = -ECANCELED;
goto err1;
goto err3;
}
}
@ -196,9 +197,12 @@ static int __init osk_soc_init(void)
(uint) clk_get_rate(tlv320aic23_mclk), CODEC_CLOCK);
return 0;
err1:
err3:
clk_put(tlv320aic23_mclk);
err2:
platform_device_del(osk_snd_device);
err1:
platform_device_put(osk_snd_device);
return err;
@ -207,6 +211,7 @@ err1:
static void __exit osk_soc_exit(void)
{
clk_put(tlv320aic23_mclk);
platform_device_unregister(osk_snd_device);
}

View File

@ -1,6 +1,7 @@
config SND_PXA2XX_SOC
tristate "SoC Audio for the Intel PXA2xx chip"
depends on ARCH_PXA
select SND_ARM
select SND_PXA2XX_LIB
help
Say Y or M if you want to add support for codecs attached to

View File

@ -38,7 +38,7 @@ static int set_audio_clock_heirachy(struct platform_device *pdev)
}
mout_epll = clk_get(NULL, "mout_epll");
if (IS_ERR(fout_epll)) {
if (IS_ERR(mout_epll)) {
printk(KERN_WARNING "%s: Cannot find mout_epll.\n",
__func__);
ret = -EINVAL;
@ -54,7 +54,7 @@ static int set_audio_clock_heirachy(struct platform_device *pdev)
}
sclk_spdif = clk_get(NULL, "sclk_spdif");
if (IS_ERR(fout_epll)) {
if (IS_ERR(sclk_spdif)) {
printk(KERN_WARNING "%s: Cannot find sclk_spdif.\n",
__func__);
ret = -EINVAL;

View File

@ -434,7 +434,7 @@ static struct snd_soc_dai_driver s6000_i2s_dai = {
.rate_max = 1562500,
},
.ops = &s6000_i2s_dai_ops,
}
};
static int __devinit s6000_i2s_probe(struct platform_device *pdev)
{

View File

@ -473,7 +473,7 @@ static int s6000_pcm_new(struct snd_card *card,
}
res = request_irq(params->irq, s6000_pcm_irq, IRQF_SHARED,
s6000_soc_platform.name, pcm);
"s6000-audio", pcm);
if (res) {
printk(KERN_ERR "s6000-pcm couldn't get IRQ\n");
return res;

View File

@ -167,7 +167,7 @@ static int s6105_aic3x_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_sync(codec);
snd_ctl_add(codec->snd_card, snd_ctl_new1(&audio_out_mux, codec));
snd_ctl_add(codec->card->snd_card, snd_ctl_new1(&audio_out_mux, codec));
return 0;
}

View File

@ -387,7 +387,7 @@ static int __devinit sh4_soc_dai_probe(struct platform_device *pdev)
static int __devexit sh4_soc_dai_remove(struct platform_device *pdev)
{
snd_soc_unregister_dai(&pdev->dev, ARRAY_SIZE(sh4_ssi_dai));
snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(sh4_ssi_dai));
return 0;
}

View File

@ -1619,12 +1619,14 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
#ifdef CONFIG_SND_SOC_AC97_BUS
/* register any AC97 codecs */
for (i = 0; i < card->num_rtd; i++) {
ret = soc_register_ac97_dai_link(&card->rtd[i]);
if (ret < 0) {
printk(KERN_ERR "asoc: failed to register AC97 %s\n", card->name);
goto probe_dai_err;
}
ret = soc_register_ac97_dai_link(&card->rtd[i]);
if (ret < 0) {
printk(KERN_ERR "asoc: failed to register AC97 %s\n", card->name);
while (--i >= 0)
soc_unregister_ac97_dai_link(&card->rtd[i]);
goto probe_dai_err;
}
}
#endif
card->instantiated = 1;
@ -3072,7 +3074,9 @@ int snd_soc_register_dais(struct device *dev,
pr_debug("Registered DAI '%s'\n", dai->name);
}
mutex_lock(&client_mutex);
snd_soc_instantiate_cards();
mutex_unlock(&client_mutex);
return 0;
err: