@@ -1155,7 +1155,6 @@ int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int
void snd_pcm_set_ops(struct snd_pcm * pcm, int direction,
const struct snd_pcm_ops *ops);
-void snd_pcm_set_sync(struct snd_pcm_substream *substream);
int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
unsigned int cmd, void *arg);
void snd_pcm_period_elapsed_under_stream_lock(struct snd_pcm_substream *substream);
@@ -515,23 +515,6 @@ void snd_pcm_set_ops(struct snd_pcm *pcm, int direction,
}
EXPORT_SYMBOL(snd_pcm_set_ops);
-/**
- * snd_pcm_set_sync - set the PCM sync id
- * @substream: the pcm substream
- *
- * Sets the PCM sync identifier for the card.
- */
-void snd_pcm_set_sync(struct snd_pcm_substream *substream)
-{
- struct snd_pcm_runtime *runtime = substream->runtime;
-
- runtime->sync.id32[0] = substream->pcm->card->number;
- runtime->sync.id32[1] = -1;
- runtime->sync.id32[2] = -1;
- runtime->sync.id32[3] = -1;
-}
-EXPORT_SYMBOL(snd_pcm_set_sync);
-
/*
* Standard ioctl routine
*/
@@ -192,7 +192,6 @@ static int pcm_open(struct snd_pcm_substream *substream)
mutex_unlock(&bebob->mutex);
- snd_pcm_set_sync(substream);
return 0;
err_locked:
@@ -243,7 +243,6 @@ static int pcm_open(struct snd_pcm_substream *substream)
mutex_unlock(&dice->mutex);
- snd_pcm_set_sync(substream);
return 0;
err_locked:
@@ -167,7 +167,6 @@ static int pcm_open(struct snd_pcm_substream *substream)
mutex_unlock(&dg00x->mutex);
- snd_pcm_set_sync(substream);
return 0;
err_locked:
@@ -206,7 +206,6 @@ static int pcm_open(struct snd_pcm_substream *substream)
mutex_unlock(&ff->mutex);
- snd_pcm_set_sync(substream);
return 0;
@@ -229,7 +229,6 @@ static int pcm_open(struct snd_pcm_substream *substream)
mutex_unlock(&efw->mutex);
- snd_pcm_set_sync(substream);
return 0;
err_locked:
@@ -184,7 +184,6 @@ static int pcm_open(struct snd_pcm_substream *substream)
}
}
- snd_pcm_set_sync(substream);
mutex_unlock(&motu->mutex);
@@ -217,7 +217,6 @@ static int pcm_open(struct snd_pcm_substream *substream)
mutex_unlock(&oxfw->mutex);
- snd_pcm_set_sync(substream);
return 0;
err_locked:
@@ -96,7 +96,6 @@ static int pcm_open(struct snd_pcm_substream *substream)
mutex_unlock(&tscm->mutex);
- snd_pcm_set_sync(substream);
return 0;
err_locked:
@@ -1505,7 +1505,6 @@ static int snd_wss_playback_open(struct snd_pcm_substream *substream)
return err;
}
chip->playback_substream = substream;
- snd_pcm_set_sync(substream);
chip->rate_constraint(runtime);
return 0;
}
@@ -1546,7 +1545,6 @@ static int snd_wss_capture_open(struct snd_pcm_substream *substream)
return err;
}
chip->capture_substream = substream;
- snd_pcm_set_sync(substream);
chip->rate_constraint(runtime);
return 0;
}
@@ -1468,7 +1468,6 @@ static int snd_ali_open(struct snd_pcm_substream *substream, int rec,
runtime->private_free = snd_ali_pcm_free_substream;
runtime->hw = *phw;
- snd_pcm_set_sync(substream);
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
0, 64*1024);
return 0;
@@ -1042,7 +1042,6 @@ static int snd_card_asihpi_playback_open(struct snd_pcm_substream *substream)
if (card->support_grouping) {
snd_card_asihpi_playback.info |= SNDRV_PCM_INFO_SYNC_START;
- snd_pcm_set_sync(substream);
}
/* struct is copied, so can create initializer dynamically */
@@ -1222,7 +1221,6 @@ static int snd_card_asihpi_capture_open(struct snd_pcm_substream *substream)
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
card->update_interval_frames, UINT_MAX);
- snd_pcm_set_sync(substream);
return 0;
}
@@ -581,7 +581,6 @@ static int snd_ca0106_pcm_open_playback_channel(struct snd_pcm_substream *substr
err = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 64);
if (err < 0)
return err;
- snd_pcm_set_sync(substream);
/* Front channel dac should already be on */
if (channel_id != PCM_FRONT_CHANNEL) {
@@ -287,7 +287,6 @@ static int pcm_open(struct snd_pcm_substream *substream,
runtime->hw = pipe->hw;
runtime->private_data = pipe;
runtime->private_free = audiopipe_free;
- snd_pcm_set_sync(substream);
/* Only mono and any even number of channels are allowed */
err = snd_pcm_hw_constraint_list(runtime, 0,
@@ -1100,7 +1100,6 @@ static int snd_ensoniq_playback1_open(struct snd_pcm_substream *substream)
ensoniq->mode |= ES_MODE_PLAY1;
ensoniq->playback1_substream = substream;
runtime->hw = snd_ensoniq_playback1;
- snd_pcm_set_sync(substream);
spin_lock_irq(&ensoniq->reg_lock);
if (ensoniq->spdif && ensoniq->playback2_substream == NULL)
ensoniq->spdif_stream = ensoniq->spdif_default;
@@ -1123,7 +1122,6 @@ static int snd_ensoniq_playback2_open(struct snd_pcm_substream *substream)
ensoniq->mode |= ES_MODE_PLAY2;
ensoniq->playback2_substream = substream;
runtime->hw = snd_ensoniq_playback2;
- snd_pcm_set_sync(substream);
spin_lock_irq(&ensoniq->reg_lock);
if (ensoniq->spdif && ensoniq->playback1_substream == NULL)
ensoniq->spdif_stream = ensoniq->spdif_default;
@@ -1146,7 +1144,6 @@ static int snd_ensoniq_capture_open(struct snd_pcm_substream *substream)
ensoniq->mode |= ES_MODE_CAPTURE;
ensoniq->capture_substream = substream;
runtime->hw = snd_ensoniq_capture;
- snd_pcm_set_sync(substream);
#ifdef CHIP1370
snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&snd_es1370_hw_constraints_clock);
@@ -663,7 +663,6 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
runtime->hw.info &= ~SNDRV_PCM_INFO_HAS_LINK_ATIME;
}
- snd_pcm_set_sync(substream);
mutex_unlock(&chip->open_mutex);
return 0;
@@ -1129,7 +1129,6 @@ static int snd_ice1712_playback_pro_open(struct snd_pcm_substream *substream)
ice->playback_pro_substream = substream;
runtime->hw = snd_ice1712_playback_pro;
- snd_pcm_set_sync(substream);
snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24);
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates);
if (is_pro_rate_locked(ice)) {
@@ -1150,7 +1149,6 @@ static int snd_ice1712_capture_pro_open(struct snd_pcm_substream *substream)
ice->capture_pro_substream = substream;
runtime->hw = snd_ice1712_capture_pro;
- snd_pcm_set_sync(substream);
snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24);
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates);
if (is_pro_rate_locked(ice)) {
@@ -1010,7 +1010,6 @@ static int snd_vt1724_playback_pro_open(struct snd_pcm_substream *substream)
runtime->private_data = (void *)&vt1724_playback_pro_reg;
ice->playback_pro_substream = substream;
runtime->hw = snd_vt1724_playback_pro;
- snd_pcm_set_sync(substream);
snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24);
set_rate_constraints(ice, substream);
mutex_lock(&ice->open_mutex);
@@ -1043,7 +1042,6 @@ static int snd_vt1724_capture_pro_open(struct snd_pcm_substream *substream)
runtime->private_data = (void *)&vt1724_capture_pro_reg;
ice->capture_pro_substream = substream;
runtime->hw = snd_vt1724_2ch_stereo;
- snd_pcm_set_sync(substream);
snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24);
set_rate_constraints(ice, substream);
snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
@@ -1191,7 +1189,6 @@ static int snd_vt1724_playback_spdif_open(struct snd_pcm_substream *substream)
set_rate_constraints(ice, substream);
} else
runtime->hw = snd_vt1724_spdif;
- snd_pcm_set_sync(substream);
snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24);
snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
VT1724_BUFFER_ALIGN);
@@ -1228,7 +1225,6 @@ static int snd_vt1724_capture_spdif_open(struct snd_pcm_substream *substream)
set_rate_constraints(ice, substream);
} else
runtime->hw = snd_vt1724_spdif;
- snd_pcm_set_sync(substream);
snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24);
snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
VT1724_BUFFER_ALIGN);
@@ -1377,7 +1373,6 @@ static int snd_vt1724_playback_indep_open(struct snd_pcm_substream *substream)
runtime->private_data = (void *)&vt1724_playback_dma_regs[substream->number];
ice->playback_con_substream_ds[substream->number] = substream;
runtime->hw = snd_vt1724_2ch_stereo;
- snd_pcm_set_sync(substream);
snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24);
set_rate_constraints(ice, substream);
return 0;
@@ -246,7 +246,6 @@ static int lx_pcm_open(struct snd_pcm_substream *substream)
snd_pcm_hw_constraint_step(runtime, 0,
SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 32);
- snd_pcm_set_sync(substream);
err = 0;
exit:
@@ -168,7 +168,6 @@ static int oxygen_open(struct snd_pcm_substream *substream,
if (err < 0)
return err;
}
- snd_pcm_set_sync(substream);
chip->streams[channel] = substream;
mutex_lock(&chip->mutex);
@@ -1059,7 +1059,6 @@ static int pcxhr_open(struct snd_pcm_substream *subs)
SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 32);
snd_pcm_hw_constraint_step(runtime, 0,
SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 32);
- snd_pcm_set_sync(subs);
mgr->ref_count_rate++;
@@ -819,7 +819,6 @@ static int snd_rme32_playback_spdif_open(struct snd_pcm_substream *substream)
struct rme32 *rme32 = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
- snd_pcm_set_sync(substream);
spin_lock_irq(&rme32->lock);
if (rme32->playback_substream != NULL) {
@@ -864,7 +863,6 @@ static int snd_rme32_capture_spdif_open(struct snd_pcm_substream *substream)
struct rme32 *rme32 = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
- snd_pcm_set_sync(substream);
spin_lock_irq(&rme32->lock);
if (rme32->capture_substream != NULL) {
@@ -904,7 +902,6 @@ snd_rme32_playback_adat_open(struct snd_pcm_substream *substream)
struct rme32 *rme32 = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
- snd_pcm_set_sync(substream);
spin_lock_irq(&rme32->lock);
if (rme32->playback_substream != NULL) {
@@ -955,7 +952,6 @@ snd_rme32_capture_adat_open(struct snd_pcm_substream *substream)
runtime->hw.rate_max = rate;
}
- snd_pcm_set_sync(substream);
spin_lock_irq(&rme32->lock);
if (rme32->capture_substream != NULL) {
@@ -1161,7 +1161,6 @@ snd_rme96_playback_spdif_open(struct snd_pcm_substream *substream)
struct rme96 *rme96 = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
- snd_pcm_set_sync(substream);
spin_lock_irq(&rme96->lock);
if (rme96->playback_substream) {
spin_unlock_irq(&rme96->lock);
@@ -1199,7 +1198,6 @@ snd_rme96_capture_spdif_open(struct snd_pcm_substream *substream)
struct rme96 *rme96 = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
- snd_pcm_set_sync(substream);
runtime->hw = snd_rme96_capture_spdif_info;
if (snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG) {
rate = snd_rme96_capture_getrate(rme96, &isadat);
@@ -1231,7 +1229,6 @@ snd_rme96_playback_adat_open(struct snd_pcm_substream *substream)
struct rme96 *rme96 = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
- snd_pcm_set_sync(substream);
spin_lock_irq(&rme96->lock);
if (rme96->playback_substream) {
spin_unlock_irq(&rme96->lock);
@@ -1265,7 +1262,6 @@ snd_rme96_capture_adat_open(struct snd_pcm_substream *substream)
struct rme96 *rme96 = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
- snd_pcm_set_sync(substream);
runtime->hw = snd_rme96_capture_adat_info;
if (snd_rme96_getinputtype(rme96) == RME96_INPUT_ANALOG) {
/* makes no sense to use analog input. Note that analog
@@ -4481,7 +4481,6 @@ static int snd_hdsp_playback_open(struct snd_pcm_substream *substream)
spin_lock_irq(&hdsp->lock);
- snd_pcm_set_sync(substream);
runtime->hw = snd_hdsp_playback_subinfo;
snd_pcm_set_runtime_buffer(substream, &hdsp->playback_dma_buf);
@@ -4557,7 +4556,6 @@ static int snd_hdsp_capture_open(struct snd_pcm_substream *substream)
spin_lock_irq(&hdsp->lock);
- snd_pcm_set_sync(substream);
runtime->hw = snd_hdsp_capture_subinfo;
snd_pcm_set_runtime_buffer(substream, &hdsp->capture_dma_buf);
@@ -6051,7 +6051,6 @@ static int snd_hdspm_open(struct snd_pcm_substream *substream)
bool playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
spin_lock_irq(&hdspm->lock);
- snd_pcm_set_sync(substream);
runtime->hw = (playback) ? snd_hdspm_playback_subinfo :
snd_hdspm_capture_subinfo;
@@ -2229,7 +2229,6 @@ static int snd_rme9652_playback_open(struct snd_pcm_substream *substream)
spin_lock_irq(&rme9652->lock);
- snd_pcm_set_sync(substream);
runtime->hw = snd_rme9652_playback_subinfo;
snd_pcm_set_runtime_buffer(substream, &rme9652->playback_dma_buf);
@@ -2288,7 +2287,6 @@ static int snd_rme9652_capture_open(struct snd_pcm_substream *substream)
spin_lock_irq(&rme9652->lock);
- snd_pcm_set_sync(substream);
runtime->hw = snd_rme9652_capture_subinfo;
snd_pcm_set_runtime_buffer(substream, &rme9652->capture_dma_buf);
@@ -480,7 +480,6 @@ static int sis_playback_open(struct snd_pcm_substream *substream)
9, 0xfff9);
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
9, 0xfff9);
- snd_pcm_set_sync(substream);
return 0;
}
@@ -669,7 +668,6 @@ static int sis_capture_open(struct snd_pcm_substream *substream)
9, 0xfff9);
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
9, 0xfff9);
- snd_pcm_set_sync(substream);
return 0;
}
@@ -1820,7 +1820,6 @@ static int snd_trident_playback_open(struct snd_pcm_substream *substream)
runtime->private_data = voice;
runtime->private_free = snd_trident_pcm_free_substream;
runtime->hw = snd_trident_playback;
- snd_pcm_set_sync(substream);
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 64*1024);
return 0;
}
@@ -1948,7 +1947,6 @@ static int snd_trident_capture_open(struct snd_pcm_substream *substream)
runtime->private_data = voice;
runtime->private_free = snd_trident_pcm_free_substream;
runtime->hw = snd_trident_capture;
- snd_pcm_set_sync(substream);
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 64*1024);
return 0;
}
@@ -491,7 +491,6 @@ static int avs_dai_fe_startup(struct snd_pcm_substream *substream, struct snd_so
if (ret < 0)
goto err;
- snd_pcm_set_sync(substream);
dev_dbg(dai->dev, "%s fe STARTUP tag %d str %p",
__func__, hdac_stream(host_stream)->stream_tag, substream);
@@ -242,7 +242,6 @@ static int skl_pcm_open(struct snd_pcm_substream *substream,
dev_dbg(dai->dev, "stream tag set in dma params=%d\n",
dma_params->stream_tag);
skl_set_suspend_active(substream, dai, true);
- snd_pcm_set_sync(substream);
mconfig = skl_tplg_fe_get_cpr_module(dai, substream->stream);
if (!mconfig) {
@@ -1140,7 +1140,6 @@ static int snd_cs4231_playback_open(struct snd_pcm_substream *substream)
return err;
chip->playback_substream = substream;
chip->p_periods_sent = 0;
- snd_pcm_set_sync(substream);
snd_cs4231_xrate(runtime);
return 0;
@@ -1159,7 +1158,6 @@ static int snd_cs4231_capture_open(struct snd_pcm_substream *substream)
return err;
chip->capture_substream = substream;
chip->c_periods_sent = 0;
- snd_pcm_set_sync(substream);
snd_cs4231_xrate(runtime);
return 0;
In Linux kernel version 4.13, the data of snd_pcm_sync_id union is not exposed to user space by a commit e11f0f90a626 ("ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO internal command"). Now we have been found no issues related to it. It means that the data is neither used by any practical applications nor drivers. This commit deletes the setter kernel API, snd_pcm_set_sync(). In all of the cases the API is called in .open callback of PCM operation. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> --- include/sound/pcm.h | 1 - sound/core/pcm_lib.c | 17 ----------------- sound/firewire/bebob/bebob_pcm.c | 1 - sound/firewire/dice/dice-pcm.c | 1 - sound/firewire/digi00x/digi00x-pcm.c | 1 - sound/firewire/fireface/ff-pcm.c | 1 - sound/firewire/fireworks/fireworks_pcm.c | 1 - sound/firewire/motu/motu-pcm.c | 1 - sound/firewire/oxfw/oxfw-pcm.c | 1 - sound/firewire/tascam/tascam-pcm.c | 1 - sound/isa/wss/wss_lib.c | 2 -- sound/pci/ali5451/ali5451.c | 1 - sound/pci/asihpi/asihpi.c | 2 -- sound/pci/ca0106/ca0106_main.c | 1 - sound/pci/echoaudio/echoaudio.c | 1 - sound/pci/ens1370.c | 3 --- sound/pci/hda/hda_controller.c | 1 - sound/pci/ice1712/ice1712.c | 2 -- sound/pci/ice1712/ice1724.c | 5 ----- sound/pci/lx6464es/lx6464es.c | 1 - sound/pci/oxygen/oxygen_pcm.c | 1 - sound/pci/pcxhr/pcxhr.c | 1 - sound/pci/rme32.c | 4 ---- sound/pci/rme96.c | 4 ---- sound/pci/rme9652/hdsp.c | 2 -- sound/pci/rme9652/hdspm.c | 1 - sound/pci/rme9652/rme9652.c | 2 -- sound/pci/sis7019.c | 2 -- sound/pci/trident/trident_main.c | 2 -- sound/soc/intel/avs/pcm.c | 1 - sound/soc/intel/skylake/skl-pcm.c | 1 - sound/sparc/cs4231.c | 2 -- 32 files changed, 68 deletions(-)