mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 05:11:32 +00:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Fix unused warnings when !SND_HDA_NEEDS_RESUME ALSA: hda - Add a fix-up for Acer dmic with ALC271x codec ASoC: add a module alias to the FSI driver ALSA: emu10k1 - Fix "Music" controls to "Synth" controls in documents ARM: s3c2440: gta02; Register dfbmcs320 device for BT audio interface ASoC: codecs: JZ4740: Fix OOPS ASoC: Fix output PGA enabling in wm_hubs CODECs ASoC: sn95031: decorate function with __devexit_p() ASoC: SAMSUNG: Fix the inverted clocks handling for pcm driver ASoC: sst_platform: Fix lock acquring ASoC: fsi: driver safely remove for against irq ASoC: fsi: modify vague PM control on probe ASoC: fsi: take care in failing case of dai register MAINTAINERS: Update Samsung ASoC maintainer's id ASoC: WM8903: HP and Line out PGA/mixer DAPM fixes ASoC: Set left channel volume update bits for WM8994 ASoC: fix config error path ASoC: check channel mismatch between cpu_dai and codec_dai ASoC: Tegra: Suspend/resume support
This commit is contained in:
commit
8d082f8f3f
@ -87,14 +87,14 @@ accumulator. ALSA uses accumulators 0 and 1 for left and right PCM.
|
||||
The result is forwarded to the ADC capture FIFO (thus to the standard capture
|
||||
PCM device).
|
||||
|
||||
name='Music Playback Volume',index=0
|
||||
name='Synth Playback Volume',index=0
|
||||
|
||||
This control is used to attenuate samples for left and right MIDI FX-bus
|
||||
accumulators. ALSA uses accumulators 4 and 5 for left and right MIDI samples.
|
||||
The result samples are forwarded to the front DAC PCM slots of the AC97 codec.
|
||||
|
||||
name='Music Capture Volume',index=0
|
||||
name='Music Capture Switch',index=0
|
||||
name='Synth Capture Volume',index=0
|
||||
name='Synth Capture Switch',index=0
|
||||
|
||||
These controls are used to attenuate samples for left and right MIDI FX-bus
|
||||
accumulator. ALSA uses accumulators 4 and 5 for left and right PCM.
|
||||
|
@ -5396,7 +5396,7 @@ F: drivers/media/video/*7146*
|
||||
F: include/media/*7146*
|
||||
|
||||
SAMSUNG AUDIO (ASoC) DRIVERS
|
||||
M: Jassi Brar <jassi.brar@samsung.com>
|
||||
M: Jassi Brar <jassisinghbrar@gmail.com>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
F: sound/soc/samsung
|
||||
|
@ -409,6 +409,10 @@ struct platform_device s3c24xx_pwm_device = {
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
static struct platform_device gta02_dfbmcs320_device = {
|
||||
.name = "dfbmcs320",
|
||||
};
|
||||
|
||||
static struct i2c_board_info gta02_i2c_devs[] __initdata = {
|
||||
{
|
||||
I2C_BOARD_INFO("pcf50633", 0x73),
|
||||
@ -523,6 +527,7 @@ static struct platform_device *gta02_devices[] __initdata = {
|
||||
&s3c_device_iis,
|
||||
&samsung_asoc_dma,
|
||||
&s3c_device_i2c0,
|
||||
>a02_dfbmcs320_device,
|
||||
>a02_buttons_device,
|
||||
&s3c_device_adc,
|
||||
&s3c_device_ts,
|
||||
|
@ -937,6 +937,7 @@ void snd_hda_shutup_pins(struct hda_codec *codec)
|
||||
}
|
||||
EXPORT_SYMBOL_HDA(snd_hda_shutup_pins);
|
||||
|
||||
#ifdef SND_HDA_NEEDS_RESUME
|
||||
/* Restore the pin controls cleared previously via snd_hda_shutup_pins() */
|
||||
static void restore_shutup_pins(struct hda_codec *codec)
|
||||
{
|
||||
@ -953,6 +954,7 @@ static void restore_shutup_pins(struct hda_codec *codec)
|
||||
}
|
||||
codec->pins_shutup = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void init_hda_cache(struct hda_cache_rec *cache,
|
||||
unsigned int record_size);
|
||||
@ -1329,6 +1331,7 @@ static void purify_inactive_streams(struct hda_codec *codec)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SND_HDA_NEEDS_RESUME
|
||||
/* clean up all streams; called from suspend */
|
||||
static void hda_cleanup_all_streams(struct hda_codec *codec)
|
||||
{
|
||||
@ -1340,6 +1343,7 @@ static void hda_cleanup_all_streams(struct hda_codec *codec)
|
||||
really_cleanup_stream(codec, p);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* amp access functions
|
||||
|
@ -14868,6 +14868,23 @@ static void alc269_fixup_hweq(struct hda_codec *codec,
|
||||
alc_write_coef_idx(codec, 0x1e, coef | 0x80);
|
||||
}
|
||||
|
||||
static void alc271_fixup_dmic(struct hda_codec *codec,
|
||||
const struct alc_fixup *fix, int action)
|
||||
{
|
||||
static struct hda_verb verbs[] = {
|
||||
{0x20, AC_VERB_SET_COEF_INDEX, 0x0d},
|
||||
{0x20, AC_VERB_SET_PROC_COEF, 0x4000},
|
||||
{}
|
||||
};
|
||||
unsigned int cfg;
|
||||
|
||||
if (strcmp(codec->chip_name, "ALC271X"))
|
||||
return;
|
||||
cfg = snd_hda_codec_get_pincfg(codec, 0x12);
|
||||
if (get_defcfg_connect(cfg) == AC_JACK_PORT_FIXED)
|
||||
snd_hda_sequence_write(codec, verbs);
|
||||
}
|
||||
|
||||
enum {
|
||||
ALC269_FIXUP_SONY_VAIO,
|
||||
ALC275_FIXUP_SONY_VAIO_GPIO2,
|
||||
@ -14876,6 +14893,7 @@ enum {
|
||||
ALC269_FIXUP_ASUS_G73JW,
|
||||
ALC269_FIXUP_LENOVO_EAPD,
|
||||
ALC275_FIXUP_SONY_HWEQ,
|
||||
ALC271_FIXUP_DMIC,
|
||||
};
|
||||
|
||||
static const struct alc_fixup alc269_fixups[] = {
|
||||
@ -14929,7 +14947,11 @@ static const struct alc_fixup alc269_fixups[] = {
|
||||
.v.func = alc269_fixup_hweq,
|
||||
.chained = true,
|
||||
.chain_id = ALC275_FIXUP_SONY_VAIO_GPIO2
|
||||
}
|
||||
},
|
||||
[ALC271_FIXUP_DMIC] = {
|
||||
.type = ALC_FIXUP_FUNC,
|
||||
.v.func = alc271_fixup_dmic,
|
||||
},
|
||||
};
|
||||
|
||||
static struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
@ -14938,6 +14960,7 @@ static struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
|
||||
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_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
|
||||
SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
|
||||
SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
|
||||
|
@ -308,8 +308,6 @@ static int jz4740_codec_dev_probe(struct snd_soc_codec *codec)
|
||||
snd_soc_dapm_add_routes(dapm, jz4740_codec_dapm_routes,
|
||||
ARRAY_SIZE(jz4740_codec_dapm_routes));
|
||||
|
||||
snd_soc_dapm_new_widgets(codec);
|
||||
|
||||
jz4740_codec_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
return 0;
|
||||
|
@ -927,7 +927,7 @@ static struct platform_driver sn95031_codec_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
.probe = sn95031_device_probe,
|
||||
.remove = sn95031_device_remove,
|
||||
.remove = __devexit_p(sn95031_device_remove),
|
||||
};
|
||||
|
||||
static int __init sn95031_init(void)
|
||||
|
@ -247,8 +247,6 @@ static int wm8903_volatile_register(struct snd_soc_codec *codec, unsigned int re
|
||||
case WM8903_REVISION_NUMBER:
|
||||
case WM8903_INTERRUPT_STATUS_1:
|
||||
case WM8903_WRITE_SEQUENCER_4:
|
||||
case WM8903_POWER_MANAGEMENT_3:
|
||||
case WM8903_POWER_MANAGEMENT_2:
|
||||
case WM8903_DC_SERVO_READBACK_1:
|
||||
case WM8903_DC_SERVO_READBACK_2:
|
||||
case WM8903_DC_SERVO_READBACK_3:
|
||||
@ -875,34 +873,40 @@ SND_SOC_DAPM_MIXER("Left Speaker Mixer", WM8903_POWER_MANAGEMENT_4, 1, 0,
|
||||
SND_SOC_DAPM_MIXER("Right Speaker Mixer", WM8903_POWER_MANAGEMENT_4, 0, 0,
|
||||
right_speaker_mixer, ARRAY_SIZE(right_speaker_mixer)),
|
||||
|
||||
SND_SOC_DAPM_PGA_S("Left Headphone Output PGA", 0, WM8903_ANALOGUE_HP_0,
|
||||
4, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("Right Headphone Output PGA", 0, WM8903_ANALOGUE_HP_0,
|
||||
SND_SOC_DAPM_PGA_S("Left Headphone Output PGA", 0, WM8903_POWER_MANAGEMENT_2,
|
||||
1, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("Right Headphone Output PGA", 0, WM8903_POWER_MANAGEMENT_2,
|
||||
0, 0, NULL, 0),
|
||||
|
||||
SND_SOC_DAPM_PGA_S("Left Line Output PGA", 0, WM8903_ANALOGUE_LINEOUT_0, 4, 0,
|
||||
SND_SOC_DAPM_PGA_S("Left Line Output PGA", 0, WM8903_POWER_MANAGEMENT_3, 1, 0,
|
||||
NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("Right Line Output PGA", 0, WM8903_ANALOGUE_LINEOUT_0, 0, 0,
|
||||
SND_SOC_DAPM_PGA_S("Right Line Output PGA", 0, WM8903_POWER_MANAGEMENT_3, 0, 0,
|
||||
NULL, 0),
|
||||
|
||||
SND_SOC_DAPM_PGA_S("HPL_RMV_SHORT", 4, WM8903_ANALOGUE_HP_0, 7, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("HPL_ENA_OUTP", 3, WM8903_ANALOGUE_HP_0, 6, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("HPL_ENA_DLY", 1, WM8903_ANALOGUE_HP_0, 5, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("HPL_ENA_DLY", 2, WM8903_ANALOGUE_HP_0, 5, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("HPL_ENA", 1, WM8903_ANALOGUE_HP_0, 4, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("HPR_RMV_SHORT", 4, WM8903_ANALOGUE_HP_0, 3, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("HPR_ENA_OUTP", 3, WM8903_ANALOGUE_HP_0, 2, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("HPR_ENA_DLY", 1, WM8903_ANALOGUE_HP_0, 1, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("HPR_ENA_DLY", 2, WM8903_ANALOGUE_HP_0, 1, 0, NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("HPR_ENA", 1, WM8903_ANALOGUE_HP_0, 0, 0, NULL, 0),
|
||||
|
||||
SND_SOC_DAPM_PGA_S("LINEOUTL_RMV_SHORT", 4, WM8903_ANALOGUE_LINEOUT_0, 7, 0,
|
||||
NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("LINEOUTL_ENA_OUTP", 3, WM8903_ANALOGUE_LINEOUT_0, 6, 0,
|
||||
NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("LINEOUTL_ENA_DLY", 1, WM8903_ANALOGUE_LINEOUT_0, 5, 0,
|
||||
SND_SOC_DAPM_PGA_S("LINEOUTL_ENA_DLY", 2, WM8903_ANALOGUE_LINEOUT_0, 5, 0,
|
||||
NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("LINEOUTL_ENA", 1, WM8903_ANALOGUE_LINEOUT_0, 4, 0,
|
||||
NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("LINEOUTR_RMV_SHORT", 4, WM8903_ANALOGUE_LINEOUT_0, 3, 0,
|
||||
NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("LINEOUTR_ENA_OUTP", 3, WM8903_ANALOGUE_LINEOUT_0, 2, 0,
|
||||
NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("LINEOUTR_ENA_DLY", 1, WM8903_ANALOGUE_LINEOUT_0, 1, 0,
|
||||
SND_SOC_DAPM_PGA_S("LINEOUTR_ENA_DLY", 2, WM8903_ANALOGUE_LINEOUT_0, 1, 0,
|
||||
NULL, 0),
|
||||
SND_SOC_DAPM_PGA_S("LINEOUTR_ENA", 1, WM8903_ANALOGUE_LINEOUT_0, 0, 0,
|
||||
NULL, 0),
|
||||
|
||||
SND_SOC_DAPM_SUPPLY("DCS Master", WM8903_DC_SERVO_0, 4, 0, NULL, 0),
|
||||
@ -1037,10 +1041,14 @@ static const struct snd_soc_dapm_route intercon[] = {
|
||||
{ "Left Speaker PGA", NULL, "Left Speaker Mixer" },
|
||||
{ "Right Speaker PGA", NULL, "Right Speaker Mixer" },
|
||||
|
||||
{ "HPL_ENA_DLY", NULL, "Left Headphone Output PGA" },
|
||||
{ "HPR_ENA_DLY", NULL, "Right Headphone Output PGA" },
|
||||
{ "LINEOUTL_ENA_DLY", NULL, "Left Line Output PGA" },
|
||||
{ "LINEOUTR_ENA_DLY", NULL, "Right Line Output PGA" },
|
||||
{ "HPL_ENA", NULL, "Left Headphone Output PGA" },
|
||||
{ "HPR_ENA", NULL, "Right Headphone Output PGA" },
|
||||
{ "HPL_ENA_DLY", NULL, "HPL_ENA" },
|
||||
{ "HPR_ENA_DLY", NULL, "HPR_ENA" },
|
||||
{ "LINEOUTL_ENA", NULL, "Left Line Output PGA" },
|
||||
{ "LINEOUTR_ENA", NULL, "Right Line Output PGA" },
|
||||
{ "LINEOUTL_ENA_DLY", NULL, "LINEOUTL_ENA" },
|
||||
{ "LINEOUTR_ENA_DLY", NULL, "LINEOUTR_ENA" },
|
||||
|
||||
{ "HPL_DCS", NULL, "DCS Master" },
|
||||
{ "HPR_DCS", NULL, "DCS Master" },
|
||||
|
@ -3261,20 +3261,36 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
|
||||
wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
/* Latch volume updates (right only; we always do left then right). */
|
||||
snd_soc_update_bits(codec, WM8994_AIF1_DAC1_LEFT_VOLUME,
|
||||
WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF1_DAC1_RIGHT_VOLUME,
|
||||
WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF1_DAC2_LEFT_VOLUME,
|
||||
WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF1_DAC2_RIGHT_VOLUME,
|
||||
WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF2_DAC_LEFT_VOLUME,
|
||||
WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF2_DAC_RIGHT_VOLUME,
|
||||
WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF1_ADC1_LEFT_VOLUME,
|
||||
WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF1_ADC1_RIGHT_VOLUME,
|
||||
WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF1_ADC2_LEFT_VOLUME,
|
||||
WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF1_ADC2_RIGHT_VOLUME,
|
||||
WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF2_ADC_LEFT_VOLUME,
|
||||
WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU);
|
||||
snd_soc_update_bits(codec, WM8994_AIF2_ADC_RIGHT_VOLUME,
|
||||
WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU);
|
||||
snd_soc_update_bits(codec, WM8994_DAC1_LEFT_VOLUME,
|
||||
WM8994_DAC1_VU, WM8994_DAC1_VU);
|
||||
snd_soc_update_bits(codec, WM8994_DAC1_RIGHT_VOLUME,
|
||||
WM8994_DAC1_VU, WM8994_DAC1_VU);
|
||||
snd_soc_update_bits(codec, WM8994_DAC2_LEFT_VOLUME,
|
||||
WM8994_DAC2_VU, WM8994_DAC2_VU);
|
||||
snd_soc_update_bits(codec, WM8994_DAC2_RIGHT_VOLUME,
|
||||
WM8994_DAC2_VU, WM8994_DAC2_VU);
|
||||
|
||||
|
@ -740,12 +740,12 @@ static const struct snd_soc_dapm_route analogue_routes[] = {
|
||||
|
||||
{ "SPKL", "Input Switch", "MIXINL" },
|
||||
{ "SPKL", "IN1LP Switch", "IN1LP" },
|
||||
{ "SPKL", "Output Switch", "Left Output Mixer" },
|
||||
{ "SPKL", "Output Switch", "Left Output PGA" },
|
||||
{ "SPKL", NULL, "TOCLK" },
|
||||
|
||||
{ "SPKR", "Input Switch", "MIXINR" },
|
||||
{ "SPKR", "IN1RP Switch", "IN1RP" },
|
||||
{ "SPKR", "Output Switch", "Right Output Mixer" },
|
||||
{ "SPKR", "Output Switch", "Right Output PGA" },
|
||||
{ "SPKR", NULL, "TOCLK" },
|
||||
|
||||
{ "SPKL Boost", "Direct Voice Switch", "Direct Voice" },
|
||||
@ -767,8 +767,8 @@ static const struct snd_soc_dapm_route analogue_routes[] = {
|
||||
{ "SPKOUTRP", NULL, "SPKR Driver" },
|
||||
{ "SPKOUTRN", NULL, "SPKR Driver" },
|
||||
|
||||
{ "Left Headphone Mux", "Mixer", "Left Output Mixer" },
|
||||
{ "Right Headphone Mux", "Mixer", "Right Output Mixer" },
|
||||
{ "Left Headphone Mux", "Mixer", "Left Output PGA" },
|
||||
{ "Right Headphone Mux", "Mixer", "Right Output PGA" },
|
||||
|
||||
{ "Headphone PGA", NULL, "Left Headphone Mux" },
|
||||
{ "Headphone PGA", NULL, "Right Headphone Mux" },
|
||||
|
@ -116,18 +116,20 @@ struct snd_soc_dai_driver sst_platform_dai[] = {
|
||||
static inline void sst_set_stream_status(struct sst_runtime_stream *stream,
|
||||
int state)
|
||||
{
|
||||
spin_lock(&stream->status_lock);
|
||||
unsigned long flags;
|
||||
spin_lock_irqsave(&stream->status_lock, flags);
|
||||
stream->stream_status = state;
|
||||
spin_unlock(&stream->status_lock);
|
||||
spin_unlock_irqrestore(&stream->status_lock, flags);
|
||||
}
|
||||
|
||||
static inline int sst_get_stream_status(struct sst_runtime_stream *stream)
|
||||
{
|
||||
int state;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock(&stream->status_lock);
|
||||
spin_lock_irqsave(&stream->status_lock, flags);
|
||||
state = stream->stream_status;
|
||||
spin_unlock(&stream->status_lock);
|
||||
spin_unlock_irqrestore(&stream->status_lock, flags);
|
||||
return state;
|
||||
}
|
||||
|
||||
|
@ -350,8 +350,8 @@ static int s3c_pcm_set_fmt(struct snd_soc_dai *cpu_dai,
|
||||
ctl = readl(regs + S3C_PCM_CTL);
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
|
||||
case SND_SOC_DAIFMT_NB_NF:
|
||||
/* Nothing to do, NB_NF by default */
|
||||
case SND_SOC_DAIFMT_IB_NF:
|
||||
/* Nothing to do, IB_NF by default */
|
||||
break;
|
||||
default:
|
||||
dev_err(pcm->dev, "Unsupported clock inversion!\n");
|
||||
|
@ -1200,10 +1200,11 @@ static int fsi_probe(struct platform_device *pdev)
|
||||
master->fsib.master = master;
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
pm_runtime_resume(&pdev->dev);
|
||||
dev_set_drvdata(&pdev->dev, master);
|
||||
|
||||
pm_runtime_get_sync(&pdev->dev);
|
||||
fsi_soft_all_reset(master);
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
|
||||
ret = request_irq(irq, &fsi_interrupt, IRQF_DISABLED,
|
||||
id_entry->name, master);
|
||||
@ -1218,8 +1219,17 @@ static int fsi_probe(struct platform_device *pdev)
|
||||
goto exit_free_irq;
|
||||
}
|
||||
|
||||
return snd_soc_register_dais(&pdev->dev, fsi_soc_dai, ARRAY_SIZE(fsi_soc_dai));
|
||||
ret = snd_soc_register_dais(&pdev->dev, fsi_soc_dai,
|
||||
ARRAY_SIZE(fsi_soc_dai));
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "cannot snd dai register\n");
|
||||
goto exit_snd_soc;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
exit_snd_soc:
|
||||
snd_soc_unregister_platform(&pdev->dev);
|
||||
exit_free_irq:
|
||||
free_irq(irq, master);
|
||||
exit_iounmap:
|
||||
@ -1238,12 +1248,11 @@ static int fsi_remove(struct platform_device *pdev)
|
||||
|
||||
master = dev_get_drvdata(&pdev->dev);
|
||||
|
||||
snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(fsi_soc_dai));
|
||||
snd_soc_unregister_platform(&pdev->dev);
|
||||
|
||||
free_irq(master->irq, master);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
free_irq(master->irq, master);
|
||||
snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(fsi_soc_dai));
|
||||
snd_soc_unregister_platform(&pdev->dev);
|
||||
|
||||
iounmap(master->base);
|
||||
kfree(master);
|
||||
@ -1321,3 +1330,4 @@ module_exit(fsi_mobile_exit);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("SuperH onchip FSI audio driver");
|
||||
MODULE_AUTHOR("Kuninori Morimoto <morimoto.kuninori@renesas.com>");
|
||||
MODULE_ALIAS("platform:fsi-pcm-audio");
|
||||
|
@ -629,6 +629,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
|
||||
runtime->hw.rates |= codec_dai_drv->capture.rates;
|
||||
}
|
||||
|
||||
ret = -EINVAL;
|
||||
snd_pcm_limit_hw_rates(runtime);
|
||||
if (!runtime->hw.rates) {
|
||||
printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",
|
||||
@ -640,7 +641,8 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
|
||||
codec_dai->name, cpu_dai->name);
|
||||
goto config_err;
|
||||
}
|
||||
if (!runtime->hw.channels_min || !runtime->hw.channels_max) {
|
||||
if (!runtime->hw.channels_min || !runtime->hw.channels_max ||
|
||||
runtime->hw.channels_min > runtime->hw.channels_max) {
|
||||
printk(KERN_ERR "asoc: %s <-> %s No matching channels\n",
|
||||
codec_dai->name, cpu_dai->name);
|
||||
goto config_err;
|
||||
@ -2060,6 +2062,7 @@ const struct dev_pm_ops snd_soc_pm_ops = {
|
||||
.resume = snd_soc_resume,
|
||||
.poweroff = snd_soc_poweroff,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(snd_soc_pm_ops);
|
||||
|
||||
/* ASoC platform driver */
|
||||
static struct platform_driver soc_driver = {
|
||||
|
@ -370,6 +370,7 @@ static struct platform_driver tegra_snd_harmony_driver = {
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &snd_soc_pm_ops,
|
||||
},
|
||||
.probe = tegra_snd_harmony_probe,
|
||||
.remove = __devexit_p(tegra_snd_harmony_remove),
|
||||
|
Loading…
Reference in New Issue
Block a user