diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2015-06-14 12:49:30 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-06-15 13:36:00 +0200 |
commit | 3e254b16b65dbbcc2528781070e1be0f7945f220 (patch) | |
tree | 74d189fcc5b6cdcf8759e7668ed20aa959a81d6a /sound/firewire/bebob/bebob_pcm.c | |
parent | ba5177131d8cb4b778a43ce995155928be851117 (diff) |
ALSA: bebob: use normalized representation for the type of clock source
This commit changes function prototype and its processing. As a result,
function caller can execute additional processing according to detected
clock source.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob/bebob_pcm.c')
-rw-r--r-- | sound/firewire/bebob/bebob_pcm.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/firewire/bebob/bebob_pcm.c b/sound/firewire/bebob/bebob_pcm.c index 4a55561ed4ec..e3f65a0698c7 100644 --- a/sound/firewire/bebob/bebob_pcm.c +++ b/sound/firewire/bebob/bebob_pcm.c @@ -157,7 +157,7 @@ pcm_open(struct snd_pcm_substream *substream) struct snd_bebob *bebob = substream->private_data; struct snd_bebob_rate_spec *spec = bebob->spec->rate; unsigned int sampling_rate; - bool internal; + enum snd_bebob_clock_type src; int err; err = snd_bebob_stream_lock_try(bebob); @@ -168,15 +168,20 @@ pcm_open(struct snd_pcm_substream *substream) if (err < 0) goto err_locked; - err = snd_bebob_stream_check_internal_clock(bebob, &internal); + err = snd_bebob_stream_get_clock_src(bebob, &src); if (err < 0) goto err_locked; + /* SYT-Match is not supported. */ + if (src == SND_BEBOB_CLOCK_TYPE_SYT) { + err = -EBUSY; + goto err_locked; + } /* * When source of clock is internal or any PCM stream are running, * the available sampling rate is limited at current sampling rate. */ - if (!internal || + if (src == SND_BEBOB_CLOCK_TYPE_EXTERNAL || amdtp_stream_pcm_running(&bebob->tx_stream) || amdtp_stream_pcm_running(&bebob->rx_stream)) { err = spec->get(bebob, &sampling_rate); |