Commit a2ae004a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sound-3.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This batch ended up being larger than wished, but there is nothing to
  worry too much there.

  Most of commits are for ASoC, a compress NULL dereference fix, a fix
  for probe error handling, and the rest are device-specific fixes.  In
  addition, we have a fix for a long-standing but of seq-dummy driver,
  which just cuts off the buggy part in the end"

* tag 'sound-3.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: seq-dummy: remove deadlock-causing events on close
  ASoC: omap-mcbsp: Correct CBM_CFS dai format configuration
  ASoC: soc-compress.c: fix NULL dereference
  ASoC: rt286: set the same format for dac and adc
  ASoC: wm8904: fix runtime warning
  ASoC: simple-card: Fix crash in asoc_simple_card_unref()
  ASoC: fsl: imx-wm8962: Set the card owner field
  ASoC: pcm512x: Fix DSP program selection
  ASoC: rt5677: Modify the behavior that updates the PLL parameter.
  ASoC: fsl_ssi: Fix irq error check
  ASoC: rockchip: i2s: applys rate symmetry for CPU DAI
  ASoC: Intel: Add NULL checks for the stream pointer
  ASoC: wm8960: Fix capture sample rate from 11250 to 11025
  ASoC: adi: Add missing return statement.
  ASoC: Intel: Don't change offset of block allocator during fixed allocate
  ASoC: ts3a227e: Check and report jack status at probe
  ASoC: fsl_esai: Fix incorrect xDC field width of xCCR registers
parents 297614f3 0767e95b
...@@ -81,36 +81,6 @@ struct snd_seq_dummy_port { ...@@ -81,36 +81,6 @@ struct snd_seq_dummy_port {
static int my_client = -1; static int my_client = -1;
/*
* unuse callback - send ALL_SOUNDS_OFF and RESET_CONTROLLERS events
* to subscribers.
* Note: this callback is called only after all subscribers are removed.
*/
static int
dummy_unuse(void *private_data, struct snd_seq_port_subscribe *info)
{
struct snd_seq_dummy_port *p;
int i;
struct snd_seq_event ev;
p = private_data;
memset(&ev, 0, sizeof(ev));
if (p->duplex)
ev.source.port = p->connect;
else
ev.source.port = p->port;
ev.dest.client = SNDRV_SEQ_ADDRESS_SUBSCRIBERS;
ev.type = SNDRV_SEQ_EVENT_CONTROLLER;
for (i = 0; i < 16; i++) {
ev.data.control.channel = i;
ev.data.control.param = MIDI_CTL_ALL_SOUNDS_OFF;
snd_seq_kernel_client_dispatch(p->client, &ev, 0, 0);
ev.data.control.param = MIDI_CTL_RESET_CONTROLLERS;
snd_seq_kernel_client_dispatch(p->client, &ev, 0, 0);
}
return 0;
}
/* /*
* event input callback - just redirect events to subscribers * event input callback - just redirect events to subscribers
*/ */
...@@ -175,7 +145,6 @@ create_port(int idx, int type) ...@@ -175,7 +145,6 @@ create_port(int idx, int type)
| SNDRV_SEQ_PORT_TYPE_PORT; | SNDRV_SEQ_PORT_TYPE_PORT;
memset(&pcb, 0, sizeof(pcb)); memset(&pcb, 0, sizeof(pcb));
pcb.owner = THIS_MODULE; pcb.owner = THIS_MODULE;
pcb.unuse = dummy_unuse;
pcb.event_input = dummy_input; pcb.event_input = dummy_input;
pcb.private_free = dummy_free; pcb.private_free = dummy_free;
pcb.private_data = rec; pcb.private_data = rec;
......
...@@ -240,6 +240,8 @@ static int axi_i2s_probe(struct platform_device *pdev) ...@@ -240,6 +240,8 @@ static int axi_i2s_probe(struct platform_device *pdev)
if (ret) if (ret)
goto err_clk_disable; goto err_clk_disable;
return 0;
err_clk_disable: err_clk_disable:
clk_disable_unprepare(i2s->clk); clk_disable_unprepare(i2s->clk);
return ret; return ret;
......
...@@ -188,8 +188,8 @@ static const DECLARE_TLV_DB_SCALE(boost_tlv, 0, 80, 0); ...@@ -188,8 +188,8 @@ static const DECLARE_TLV_DB_SCALE(boost_tlv, 0, 80, 0);
static const char * const pcm512x_dsp_program_texts[] = { static const char * const pcm512x_dsp_program_texts[] = {
"FIR interpolation with de-emphasis", "FIR interpolation with de-emphasis",
"Low latency IIR with de-emphasis", "Low latency IIR with de-emphasis",
"Fixed process flow",
"High attenuation with de-emphasis", "High attenuation with de-emphasis",
"Fixed process flow",
"Ringing-less low latency FIR", "Ringing-less low latency FIR",
}; };
......
...@@ -861,10 +861,8 @@ static int rt286_hw_params(struct snd_pcm_substream *substream, ...@@ -861,10 +861,8 @@ static int rt286_hw_params(struct snd_pcm_substream *substream,
RT286_I2S_CTRL1, 0x0018, d_len_code << 3); RT286_I2S_CTRL1, 0x0018, d_len_code << 3);
dev_dbg(codec->dev, "format val = 0x%x\n", val); dev_dbg(codec->dev, "format val = 0x%x\n", val);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) snd_soc_update_bits(codec, RT286_DAC_FORMAT, 0x407f, val);
snd_soc_update_bits(codec, RT286_DAC_FORMAT, 0x407f, val); snd_soc_update_bits(codec, RT286_ADC_FORMAT, 0x407f, val);
else
snd_soc_update_bits(codec, RT286_ADC_FORMAT, 0x407f, val);
return 0; return 0;
} }
......
...@@ -2083,10 +2083,14 @@ static int rt5677_set_pll1_event(struct snd_soc_dapm_widget *w, ...@@ -2083,10 +2083,14 @@ static int rt5677_set_pll1_event(struct snd_soc_dapm_widget *w,
struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
switch (event) { switch (event) {
case SND_SOC_DAPM_POST_PMU: case SND_SOC_DAPM_PRE_PMU:
regmap_update_bits(rt5677->regmap, RT5677_PLL1_CTRL2, 0x2, 0x2); regmap_update_bits(rt5677->regmap, RT5677_PLL1_CTRL2, 0x2, 0x2);
break;
case SND_SOC_DAPM_POST_PMU:
regmap_update_bits(rt5677->regmap, RT5677_PLL1_CTRL2, 0x2, 0x0); regmap_update_bits(rt5677->regmap, RT5677_PLL1_CTRL2, 0x2, 0x0);
break; break;
default: default:
return 0; return 0;
} }
...@@ -2101,10 +2105,14 @@ static int rt5677_set_pll2_event(struct snd_soc_dapm_widget *w, ...@@ -2101,10 +2105,14 @@ static int rt5677_set_pll2_event(struct snd_soc_dapm_widget *w,
struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
switch (event) { switch (event) {
case SND_SOC_DAPM_POST_PMU: case SND_SOC_DAPM_PRE_PMU:
regmap_update_bits(rt5677->regmap, RT5677_PLL2_CTRL2, 0x2, 0x2); regmap_update_bits(rt5677->regmap, RT5677_PLL2_CTRL2, 0x2, 0x2);
break;
case SND_SOC_DAPM_POST_PMU:
regmap_update_bits(rt5677->regmap, RT5677_PLL2_CTRL2, 0x2, 0x0); regmap_update_bits(rt5677->regmap, RT5677_PLL2_CTRL2, 0x2, 0x0);
break; break;
default: default:
return 0; return 0;
} }
...@@ -2212,9 +2220,11 @@ static int rt5677_vref_event(struct snd_soc_dapm_widget *w, ...@@ -2212,9 +2220,11 @@ static int rt5677_vref_event(struct snd_soc_dapm_widget *w,
static const struct snd_soc_dapm_widget rt5677_dapm_widgets[] = { static const struct snd_soc_dapm_widget rt5677_dapm_widgets[] = {
SND_SOC_DAPM_SUPPLY("PLL1", RT5677_PWR_ANLG2, RT5677_PWR_PLL1_BIT, SND_SOC_DAPM_SUPPLY("PLL1", RT5677_PWR_ANLG2, RT5677_PWR_PLL1_BIT,
0, rt5677_set_pll1_event, SND_SOC_DAPM_POST_PMU), 0, rt5677_set_pll1_event, SND_SOC_DAPM_PRE_PMU |
SND_SOC_DAPM_POST_PMU),
SND_SOC_DAPM_SUPPLY("PLL2", RT5677_PWR_ANLG2, RT5677_PWR_PLL2_BIT, SND_SOC_DAPM_SUPPLY("PLL2", RT5677_PWR_ANLG2, RT5677_PWR_PLL2_BIT,
0, rt5677_set_pll2_event, SND_SOC_DAPM_POST_PMU), 0, rt5677_set_pll2_event, SND_SOC_DAPM_PRE_PMU |
SND_SOC_DAPM_POST_PMU),
/* Input Side */ /* Input Side */
/* micbias */ /* micbias */
......
...@@ -254,6 +254,7 @@ static int ts3a227e_i2c_probe(struct i2c_client *i2c, ...@@ -254,6 +254,7 @@ static int ts3a227e_i2c_probe(struct i2c_client *i2c,
struct ts3a227e *ts3a227e; struct ts3a227e *ts3a227e;
struct device *dev = &i2c->dev; struct device *dev = &i2c->dev;
int ret; int ret;
unsigned int acc_reg;
ts3a227e = devm_kzalloc(&i2c->dev, sizeof(*ts3a227e), GFP_KERNEL); ts3a227e = devm_kzalloc(&i2c->dev, sizeof(*ts3a227e), GFP_KERNEL);
if (ts3a227e == NULL) if (ts3a227e == NULL)
...@@ -283,6 +284,11 @@ static int ts3a227e_i2c_probe(struct i2c_client *i2c, ...@@ -283,6 +284,11 @@ static int ts3a227e_i2c_probe(struct i2c_client *i2c,
INTB_DISABLE | ADC_COMPLETE_INT_DISABLE, INTB_DISABLE | ADC_COMPLETE_INT_DISABLE,
ADC_COMPLETE_INT_DISABLE); ADC_COMPLETE_INT_DISABLE);
/* Read jack status because chip might not trigger interrupt at boot. */
regmap_read(ts3a227e->regmap, TS3A227E_REG_ACCESSORY_STATUS, &acc_reg);
ts3a227e_new_jack_state(ts3a227e, acc_reg);
ts3a227e_jack_report(ts3a227e);
return 0; return 0;
} }
......
...@@ -1076,10 +1076,13 @@ static const struct snd_soc_dapm_route adc_intercon[] = { ...@@ -1076,10 +1076,13 @@ static const struct snd_soc_dapm_route adc_intercon[] = {
{ "Right Capture PGA", NULL, "Right Capture Mux" }, { "Right Capture PGA", NULL, "Right Capture Mux" },
{ "Right Capture PGA", NULL, "Right Capture Inverting Mux" }, { "Right Capture PGA", NULL, "Right Capture Inverting Mux" },
{ "AIFOUTL", "Left", "ADCL" }, { "AIFOUTL Mux", "Left", "ADCL" },
{ "AIFOUTL", "Right", "ADCR" }, { "AIFOUTL Mux", "Right", "ADCR" },
{ "AIFOUTR", "Left", "ADCL" }, { "AIFOUTR Mux", "Left", "ADCL" },
{ "AIFOUTR", "Right", "ADCR" }, { "AIFOUTR Mux", "Right", "ADCR" },
{ "AIFOUTL", NULL, "AIFOUTL Mux" },
{ "AIFOUTR", NULL, "AIFOUTR Mux" },
{ "ADCL", NULL, "CLK_DSP" }, { "ADCL", NULL, "CLK_DSP" },
{ "ADCL", NULL, "Left Capture PGA" }, { "ADCL", NULL, "Left Capture PGA" },
...@@ -1089,12 +1092,16 @@ static const struct snd_soc_dapm_route adc_intercon[] = { ...@@ -1089,12 +1092,16 @@ static const struct snd_soc_dapm_route adc_intercon[] = {
}; };
static const struct snd_soc_dapm_route dac_intercon[] = { static const struct snd_soc_dapm_route dac_intercon[] = {
{ "DACL", "Right", "AIFINR" }, { "DACL Mux", "Left", "AIFINL" },
{ "DACL", "Left", "AIFINL" }, { "DACL Mux", "Right", "AIFINR" },
{ "DACR Mux", "Left", "AIFINL" },
{ "DACR Mux", "Right", "AIFINR" },
{ "DACL", NULL, "DACL Mux" },
{ "DACL", NULL, "CLK_DSP" }, { "DACL", NULL, "CLK_DSP" },
{ "DACR", "Right", "AIFINR" }, { "DACR", NULL, "DACR Mux" },
{ "DACR", "Left", "AIFINL" },
{ "DACR", NULL, "CLK_DSP" }, { "DACR", NULL, "CLK_DSP" },
{ "Charge pump", NULL, "SYSCLK" }, { "Charge pump", NULL, "SYSCLK" },
......
...@@ -556,7 +556,7 @@ static struct { ...@@ -556,7 +556,7 @@ static struct {
{ 22050, 2 }, { 22050, 2 },
{ 24000, 2 }, { 24000, 2 },
{ 16000, 3 }, { 16000, 3 },
{ 11250, 4 }, { 11025, 4 },
{ 12000, 4 }, { 12000, 4 },
{ 8000, 5 }, { 8000, 5 },
}; };
......
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
#define ESAI_xCCR_xFP_MASK (((1 << ESAI_xCCR_xFP_WIDTH) - 1) << ESAI_xCCR_xFP_SHIFT) #define ESAI_xCCR_xFP_MASK (((1 << ESAI_xCCR_xFP_WIDTH) - 1) << ESAI_xCCR_xFP_SHIFT)
#define ESAI_xCCR_xFP(v) ((((v) - 1) << ESAI_xCCR_xFP_SHIFT) & ESAI_xCCR_xFP_MASK) #define ESAI_xCCR_xFP(v) ((((v) - 1) << ESAI_xCCR_xFP_SHIFT) & ESAI_xCCR_xFP_MASK)
#define ESAI_xCCR_xDC_SHIFT 9 #define ESAI_xCCR_xDC_SHIFT 9
#define ESAI_xCCR_xDC_WIDTH 4 #define ESAI_xCCR_xDC_WIDTH 5
#define ESAI_xCCR_xDC_MASK (((1 << ESAI_xCCR_xDC_WIDTH) - 1) << ESAI_xCCR_xDC_SHIFT) #define ESAI_xCCR_xDC_MASK (((1 << ESAI_xCCR_xDC_WIDTH) - 1) << ESAI_xCCR_xDC_SHIFT)
#define ESAI_xCCR_xDC(v) ((((v) - 1) << ESAI_xCCR_xDC_SHIFT) & ESAI_xCCR_xDC_MASK) #define ESAI_xCCR_xDC(v) ((((v) - 1) << ESAI_xCCR_xDC_SHIFT) & ESAI_xCCR_xDC_MASK)
#define ESAI_xCCR_xPSR_SHIFT 8 #define ESAI_xCCR_xPSR_SHIFT 8
......
...@@ -1362,9 +1362,9 @@ static int fsl_ssi_probe(struct platform_device *pdev) ...@@ -1362,9 +1362,9 @@ static int fsl_ssi_probe(struct platform_device *pdev)
} }
ssi_private->irq = platform_get_irq(pdev, 0); ssi_private->irq = platform_get_irq(pdev, 0);
if (!ssi_private->irq) { if (ssi_private->irq < 0) {
dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); dev_err(&pdev->dev, "no irq for node %s\n", np->full_name);
return -ENXIO; return ssi_private->irq;
} }
/* Are the RX and the TX clocks locked? */ /* Are the RX and the TX clocks locked? */
......
...@@ -257,6 +257,7 @@ static int imx_wm8962_probe(struct platform_device *pdev) ...@@ -257,6 +257,7 @@ static int imx_wm8962_probe(struct platform_device *pdev)
if (ret) if (ret)
goto clk_fail; goto clk_fail;
data->card.num_links = 1; data->card.num_links = 1;
data->card.owner = THIS_MODULE;
data->card.dai_link = &data->dai; data->card.dai_link = &data->dai;
data->card.dapm_widgets = imx_wm8962_dapm_widgets; data->card.dapm_widgets = imx_wm8962_dapm_widgets;
data->card.num_dapm_widgets = ARRAY_SIZE(imx_wm8962_dapm_widgets); data->card.num_dapm_widgets = ARRAY_SIZE(imx_wm8962_dapm_widgets);
......
...@@ -452,9 +452,8 @@ static int asoc_simple_card_parse_of(struct device_node *node, ...@@ -452,9 +452,8 @@ static int asoc_simple_card_parse_of(struct device_node *node,
} }
/* Decrease the reference count of the device nodes */ /* Decrease the reference count of the device nodes */
static int asoc_simple_card_unref(struct platform_device *pdev) static int asoc_simple_card_unref(struct snd_soc_card *card)
{ {
struct snd_soc_card *card = platform_get_drvdata(pdev);
struct snd_soc_dai_link *dai_link; struct snd_soc_dai_link *dai_link;
int num_links; int num_links;
...@@ -556,7 +555,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev) ...@@ -556,7 +555,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
return ret; return ret;
err: err:
asoc_simple_card_unref(pdev); asoc_simple_card_unref(&priv->snd_card);
return ret; return ret;
} }
...@@ -572,7 +571,7 @@ static int asoc_simple_card_remove(struct platform_device *pdev) ...@@ -572,7 +571,7 @@ static int asoc_simple_card_remove(struct platform_device *pdev)
snd_soc_jack_free_gpios(&simple_card_mic_jack, 1, snd_soc_jack_free_gpios(&simple_card_mic_jack, 1,
&simple_card_mic_jack_gpio); &simple_card_mic_jack_gpio);
return asoc_simple_card_unref(pdev); return asoc_simple_card_unref(card);
} }
static const struct of_device_id asoc_simple_of_match[] = { static const struct of_device_id asoc_simple_of_match[] = {
......
...@@ -706,6 +706,7 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba ...@@ -706,6 +706,7 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba
struct list_head *block_list) struct list_head *block_list)
{ {
struct sst_mem_block *block, *tmp; struct sst_mem_block *block, *tmp;
struct sst_block_allocator ba_tmp = *ba;
u32 end = ba->offset + ba->size, block_end; u32 end = ba->offset + ba->size, block_end;
int err; int err;
...@@ -730,9 +731,9 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba ...@@ -730,9 +731,9 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba
if (ba->offset >= block->offset && ba->offset < block_end) { if (ba->offset >= block->offset && ba->offset < block_end) {
/* align ba to block boundary */ /* align ba to block boundary */
ba->size -= block_end - ba->offset; ba_tmp.size -= block_end - ba->offset;
ba->offset = block_end; ba_tmp.offset = block_end;
err = block_alloc_contiguous(dsp, ba, block_list); err = block_alloc_contiguous(dsp, &ba_tmp, block_list);
if (err < 0) if (err < 0)
return -ENOMEM; return -ENOMEM;
...@@ -767,10 +768,10 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba ...@@ -767,10 +768,10 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba
list_move(&block->list, &dsp->used_block_list); list_move(&block->list, &dsp->used_block_list);
list_add(&block->module_list, block_list); list_add(&block->module_list, block_list);
/* align ba to block boundary */ /* align ba to block boundary */
ba->size -= block_end - ba->offset; ba_tmp.size -= block_end - ba->offset;
ba->offset = block_end; ba_tmp.offset = block_end;
err = block_alloc_contiguous(dsp, ba, block_list); err = block_alloc_contiguous(dsp, &ba_tmp, block_list);
if (err < 0) if (err < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -1228,6 +1228,11 @@ int sst_hsw_stream_free(struct sst_hsw *hsw, struct sst_hsw_stream *stream) ...@@ -1228,6 +1228,11 @@ int sst_hsw_stream_free(struct sst_hsw *hsw, struct sst_hsw_stream *stream)
struct sst_dsp *sst = hsw->dsp; struct sst_dsp *sst = hsw->dsp;
unsigned long flags; unsigned long flags;
if (!stream) {
dev_warn(hsw->dev, "warning: stream is NULL, no stream to free, ignore it.\n");
return 0;
}
/* dont free DSP streams that are not commited */ /* dont free DSP streams that are not commited */
if (!stream->commited) if (!stream->commited)
goto out; goto out;
...@@ -1415,6 +1420,16 @@ int sst_hsw_stream_commit(struct sst_hsw *hsw, struct sst_hsw_stream *stream) ...@@ -1415,6 +1420,16 @@ int sst_hsw_stream_commit(struct sst_hsw *hsw, struct sst_hsw_stream *stream)
u32 header; u32 header;
int ret; int ret;
if (!stream) {
dev_warn(hsw->dev, "warning: stream is NULL, no stream to commit, ignore it.\n");
return 0;
}
if (stream->commited) {
dev_warn(hsw->dev, "warning: stream is already committed, ignore it.\n");
return 0;
}
trace_ipc_request("stream alloc", stream->host_id); trace_ipc_request("stream alloc", stream->host_id);
header = IPC_GLB_TYPE(IPC_GLB_ALLOCATE_STREAM); header = IPC_GLB_TYPE(IPC_GLB_ALLOCATE_STREAM);
...@@ -1519,6 +1534,11 @@ int sst_hsw_stream_pause(struct sst_hsw *hsw, struct sst_hsw_stream *stream, ...@@ -1519,6 +1534,11 @@ int sst_hsw_stream_pause(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
{ {
int ret; int ret;
if (!stream) {
dev_warn(hsw->dev, "warning: stream is NULL, no stream to pause, ignore it.\n");
return 0;
}
trace_ipc_request("stream pause", stream->reply.stream_hw_id); trace_ipc_request("stream pause", stream->reply.stream_hw_id);
ret = sst_hsw_stream_operations(hsw, IPC_STR_PAUSE, ret = sst_hsw_stream_operations(hsw, IPC_STR_PAUSE,
...@@ -1535,6 +1555,11 @@ int sst_hsw_stream_resume(struct sst_hsw *hsw, struct sst_hsw_stream *stream, ...@@ -1535,6 +1555,11 @@ int sst_hsw_stream_resume(struct sst_hsw *hsw, struct sst_hsw_stream *stream,
{ {
int ret; int ret;
if (!stream) {
dev_warn(hsw->dev, "warning: stream is NULL, no stream to resume, ignore it.\n");
return 0;
}
trace_ipc_request("stream resume", stream->reply.stream_hw_id); trace_ipc_request("stream resume", stream->reply.stream_hw_id);
ret = sst_hsw_stream_operations(hsw, IPC_STR_RESUME, ret = sst_hsw_stream_operations(hsw, IPC_STR_RESUME,
...@@ -1550,6 +1575,11 @@ int sst_hsw_stream_reset(struct sst_hsw *hsw, struct sst_hsw_stream *stream) ...@@ -1550,6 +1575,11 @@ int sst_hsw_stream_reset(struct sst_hsw *hsw, struct sst_hsw_stream *stream)
{ {
int ret, tries = 10; int ret, tries = 10;
if (!stream) {
dev_warn(hsw->dev, "warning: stream is NULL, no stream to reset, ignore it.\n");
return 0;
}
/* dont reset streams that are not commited */ /* dont reset streams that are not commited */
if (!stream->commited) if (!stream->commited)
return 0; return 0;
......
...@@ -434,7 +434,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, ...@@ -434,7 +434,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
case SND_SOC_DAIFMT_CBM_CFS: case SND_SOC_DAIFMT_CBM_CFS:
/* McBSP slave. FS clock as output */ /* McBSP slave. FS clock as output */
regs->srgr2 |= FSGM; regs->srgr2 |= FSGM;
regs->pcr0 |= FSXM; regs->pcr0 |= FSXM | FSRM;
break; break;
case SND_SOC_DAIFMT_CBM_CFM: case SND_SOC_DAIFMT_CBM_CFM:
/* McBSP slave */ /* McBSP slave */
......
...@@ -335,6 +335,7 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = { ...@@ -335,6 +335,7 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = {
SNDRV_PCM_FMTBIT_S24_LE), SNDRV_PCM_FMTBIT_S24_LE),
}, },
.ops = &rockchip_i2s_dai_ops, .ops = &rockchip_i2s_dai_ops,
.symmetric_rates = 1,
}; };
static const struct snd_soc_component_driver rockchip_i2s_component = { static const struct snd_soc_component_driver rockchip_i2s_component = {
......
...@@ -659,7 +659,8 @@ int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) ...@@ -659,7 +659,8 @@ int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
rtd->dai_link->stream_name); rtd->dai_link->stream_name);
ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num,
1, 0, &be_pcm); rtd->dai_link->dpcm_playback,
rtd->dai_link->dpcm_capture, &be_pcm);
if (ret < 0) { if (ret < 0) {
dev_err(rtd->card->dev, "ASoC: can't create compressed for %s\n", dev_err(rtd->card->dev, "ASoC: can't create compressed for %s\n",
rtd->dai_link->name); rtd->dai_link->name);
...@@ -668,8 +669,10 @@ int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) ...@@ -668,8 +669,10 @@ int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
rtd->pcm = be_pcm; rtd->pcm = be_pcm;
rtd->fe_compr = 1; rtd->fe_compr = 1;
be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd; if (rtd->dai_link->dpcm_playback)
be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd; be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd;
else if (rtd->dai_link->dpcm_capture)
be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd;
memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops)); memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops));
} else } else
memcpy(compr->ops, &soc_compr_ops, sizeof(soc_compr_ops)); memcpy(compr->ops, &soc_compr_ops, sizeof(soc_compr_ops));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment