|
|
@@ -80,7 +80,7 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
|
|
|
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
|
|
int ret;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
if (cpu_dai->driver->cops && cpu_dai->driver->cops->startup) {
|
|
|
ret = cpu_dai->driver->cops->startup(cstream, cpu_dai);
|
|
|
@@ -108,7 +108,7 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
|
|
|
|
|
|
snd_soc_runtime_activate(rtd, cstream->direction);
|
|
|
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
@@ -118,7 +118,7 @@ machine_err:
|
|
|
if (cpu_dai->driver->cops && cpu_dai->driver->cops->shutdown)
|
|
|
cpu_dai->driver->cops->shutdown(cstream, cpu_dai);
|
|
|
out:
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@@ -224,7 +224,7 @@ static void close_delayed_work(struct work_struct *work)
|
|
|
container_of(work, struct snd_soc_pcm_runtime, delayed_work.work);
|
|
|
struct snd_soc_dai *codec_dai = rtd->codec_dai;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
dev_dbg(rtd->dev,
|
|
|
"Compress ASoC: pop wq checking: %s status: %s waiting: %s\n",
|
|
|
@@ -239,7 +239,7 @@ static void close_delayed_work(struct work_struct *work)
|
|
|
SND_SOC_DAPM_STREAM_STOP);
|
|
|
}
|
|
|
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
}
|
|
|
|
|
|
static int soc_compr_free(struct snd_compr_stream *cstream)
|
|
|
@@ -249,7 +249,7 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
|
|
|
struct snd_soc_dai *codec_dai = rtd->codec_dai;
|
|
|
int stream;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
if (cstream->direction == SND_COMPRESS_PLAYBACK)
|
|
|
stream = SNDRV_PCM_STREAM_PLAYBACK;
|
|
|
@@ -292,7 +292,7 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
|
|
|
SND_SOC_DAPM_STREAM_STOP);
|
|
|
}
|
|
|
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
@@ -355,7 +355,7 @@ static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd)
|
|
|
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
|
|
int ret = 0, __ret;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
for_each_rtdcom(rtd, rtdcom) {
|
|
|
component = rtdcom->component;
|
|
|
@@ -384,7 +384,7 @@ static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd)
|
|
|
}
|
|
|
|
|
|
out:
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@@ -474,7 +474,7 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
|
|
|
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
|
|
int ret = 0, __ret;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
/*
|
|
|
* First we call set_params for the CPU DAI, then the component
|
|
|
@@ -518,14 +518,14 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
|
|
|
|
|
|
/* cancel any delayed stream shutdown that is pending */
|
|
|
rtd->pop_wait = 0;
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
|
|
|
cancel_delayed_work_sync(&rtd->delayed_work);
|
|
|
|
|
|
return ret;
|
|
|
|
|
|
err:
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@@ -609,7 +609,7 @@ static int soc_compr_get_params(struct snd_compr_stream *cstream,
|
|
|
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
|
|
int ret = 0, __ret;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
if (cpu_dai->driver->cops && cpu_dai->driver->cops->get_params) {
|
|
|
ret = cpu_dai->driver->cops->get_params(cstream, params, cpu_dai);
|
|
|
@@ -630,7 +630,7 @@ static int soc_compr_get_params(struct snd_compr_stream *cstream,
|
|
|
}
|
|
|
|
|
|
err:
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@@ -642,7 +642,7 @@ static int soc_compr_get_caps(struct snd_compr_stream *cstream,
|
|
|
struct snd_soc_rtdcom_list *rtdcom;
|
|
|
int ret = 0, __ret;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
for_each_rtdcom(rtd, rtdcom) {
|
|
|
component = rtdcom->component;
|
|
|
@@ -656,7 +656,7 @@ static int soc_compr_get_caps(struct snd_compr_stream *cstream,
|
|
|
ret = __ret;
|
|
|
}
|
|
|
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@@ -668,7 +668,7 @@ static int soc_compr_get_codec_caps(struct snd_compr_stream *cstream,
|
|
|
struct snd_soc_rtdcom_list *rtdcom;
|
|
|
int ret = 0, __ret;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
for_each_rtdcom(rtd, rtdcom) {
|
|
|
component = rtdcom->component;
|
|
|
@@ -682,7 +682,7 @@ static int soc_compr_get_codec_caps(struct snd_compr_stream *cstream,
|
|
|
ret = __ret;
|
|
|
}
|
|
|
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@@ -694,7 +694,7 @@ static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes)
|
|
|
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
|
|
int ret = 0, __ret;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
if (cpu_dai->driver->cops && cpu_dai->driver->cops->ack) {
|
|
|
ret = cpu_dai->driver->cops->ack(cstream, bytes, cpu_dai);
|
|
|
@@ -715,7 +715,7 @@ static int soc_compr_ack(struct snd_compr_stream *cstream, size_t bytes)
|
|
|
}
|
|
|
|
|
|
err:
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@@ -728,7 +728,7 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
|
|
|
int ret = 0, __ret;
|
|
|
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
if (cpu_dai->driver->cops && cpu_dai->driver->cops->pointer)
|
|
|
cpu_dai->driver->cops->pointer(cstream, tstamp, cpu_dai);
|
|
|
@@ -745,7 +745,7 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream,
|
|
|
ret = __ret;
|
|
|
}
|
|
|
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
@@ -757,7 +757,7 @@ static int soc_compr_copy(struct snd_compr_stream *cstream,
|
|
|
struct snd_soc_rtdcom_list *rtdcom;
|
|
|
int ret = 0;
|
|
|
|
|
|
- mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
+ mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
|
|
|
|
|
|
for_each_rtdcom(rtd, rtdcom) {
|
|
|
component = rtdcom->component;
|
|
|
@@ -770,7 +770,7 @@ static int soc_compr_copy(struct snd_compr_stream *cstream,
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- mutex_unlock(&rtd->pcm_mutex);
|
|
|
+ mutex_unlock(&rtd->card->pcm_mutex);
|
|
|
return ret;
|
|
|
}
|
|
|
|