unsigned int consumed = 0;
int new_period = 0;
- audio_info(" .. IN\n");
audio_info("alsa_stream=%p substream=%p\n", alsa_stream,
alsa_stream ? alsa_stream->substream : 0);
} else {
audio_warning(" unexpected NULL substream\n");
}
- audio_info(" .. OUT\n");
}
/* open callback */
int idx;
int err;
- audio_info(" .. IN (%d)\n", substream->number);
if (mutex_lock_interruptible(&chip->audio_mutex)) {
audio_error("Interrupted whilst waiting for lock\n");
out:
mutex_unlock(&chip->audio_mutex);
- audio_info(" .. OUT =%d\n", err);
return err;
}
struct snd_pcm_runtime *runtime;
struct bcm2835_alsa_stream *alsa_stream;
- audio_info(" .. IN\n");
chip = snd_pcm_substream_chip(substream);
if (mutex_lock_interruptible(&chip->audio_mutex)) {
chip->opened &= ~(1 << substream->number);
mutex_unlock(&chip->audio_mutex);
- audio_info(" .. OUT\n");
return 0;
}
struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;
int err;
- audio_info(" .. IN\n");
err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
if (err < 0) {
alsa_stream->channels = params_channels(params);
alsa_stream->params_rate = params_rate(params);
alsa_stream->pcm_format_width = snd_pcm_format_width(params_format(params));
- audio_info(" .. OUT\n");
return err;
}
/* hw_free callback */
static int snd_bcm2835_pcm_hw_free(struct snd_pcm_substream *substream)
{
- audio_info(" .. IN\n");
return snd_pcm_lib_free_pages(substream);
}
int channels;
int err;
- audio_info(" .. IN\n");
if (mutex_lock_interruptible(&chip->audio_mutex))
return -EINTR;
alsa_stream->pos, runtime->frame_bits);
mutex_unlock(&chip->audio_mutex);
- audio_info(" .. OUT\n");
return 0;
}
struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;
int err = 0;
- audio_info(" .. IN\n");
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
err = -EINVAL;
}
- audio_info(" .. OUT\n");
return err;
}
struct snd_pcm_runtime *runtime = substream->runtime;
struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;
- audio_info(" .. IN\n");
audio_debug("pcm_pointer... (%d) hwptr=%d appl=%d pos=%d\n", 0,
frames_to_bytes(runtime, runtime->status->hw_ptr),
frames_to_bytes(runtime, runtime->control->appl_ptr),
alsa_stream->pos);
- audio_info(" .. OUT\n");
return snd_pcm_indirect_playback_pointer(substream,
&alsa_stream->pcm_indirect,
alsa_stream->pos);
struct snd_pcm *pcm;
int err;
- audio_info(" .. IN\n");
mutex_init(&chip->audio_mutex);
if (mutex_lock_interruptible(&chip->audio_mutex)) {
audio_error("Interrupted whilst waiting for lock\n");
out:
mutex_unlock(&chip->audio_mutex);
- audio_info(" .. OUT\n");
return 0;
}
struct snd_pcm *pcm;
int err;
- audio_info(" .. IN\n");
if (mutex_lock_interruptible(&chip->audio_mutex)) {
audio_error("Interrupted whilst waiting for lock\n");
return -EINTR;
snd_bcm2835_playback_spdif_hw.buffer_bytes_max, snd_bcm2835_playback_spdif_hw.buffer_bytes_max);
out:
mutex_unlock(&chip->audio_mutex);
- audio_info(" .. OUT\n");
return 0;
}
container_of(work, struct bcm2835_audio_work, my_work);
int ret = -9;
- LOG_DBG(" .. IN %p:%d\n", w->alsa_stream, w->cmd);
switch (w->cmd) {
case BCM2835_AUDIO_START:
ret = bcm2835_audio_start_worker(w->alsa_stream);
break;
}
kfree((void *)work);
- LOG_DBG(" .. OUT %d\n", ret);
}
int bcm2835_audio_start(struct bcm2835_alsa_stream *alsa_stream)
{
- LOG_DBG(" .. IN\n");
if (alsa_stream->my_wq) {
struct bcm2835_audio_work *work;
return -EBUSY;
}
}
- LOG_DBG(" .. OUT\n");
return 0;
}
int bcm2835_audio_stop(struct bcm2835_alsa_stream *alsa_stream)
{
- LOG_DBG(" .. IN\n");
if (alsa_stream->my_wq) {
struct bcm2835_audio_work *work;
return -EBUSY;
}
}
- LOG_DBG(" .. OUT\n");
return 0;
}
int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream,
unsigned int count, void *src)
{
- LOG_DBG(" .. IN\n");
if (alsa_stream->my_wq) {
struct bcm2835_audio_work *work;
return -EBUSY;
}
}
- LOG_DBG(" .. OUT\n");
return 0;
}
int msg_len;
struct vc_audio_msg m;
- LOG_DBG(" .. IN instance=%p, handle=%p, alsa=%p, reason=%d, handle=%p\n",
- instance, instance ? instance->vchi_handle[0] : NULL, instance ? instance->alsa_stream : NULL, reason, msg_handle);
-
if (reason != VCHI_CALLBACK_MSG_AVAILABLE)
return;
} else {
LOG_ERR(" .. unexpected m.type=%d\n", m.type);
}
- LOG_DBG(" .. OUT\n");
}
static struct bcm2835_audio_instance *
{
unsigned int i;
- LOG_DBG(" .. IN\n");
if (!instance) {
LOG_ERR("%s: invalid handle %p\n", __func__, instance);
kfree(instance);
- LOG_DBG(" .. OUT\n");
return 0;
}
(struct bcm2835_audio_instance *)alsa_stream->instance;
int ret;
- LOG_DBG(" .. IN\n");
LOG_INFO("%s: start\n", __func__);
BUG_ON(instance);
ret = 0;
err_free_mem:
kfree(vchi_instance);
- LOG_DBG(" .. OUT\n");
return ret;
}
int status;
int ret;
- LOG_DBG(" .. IN\n");
my_workqueue_init(alsa_stream);
vchi_service_release(instance->vchi_handle[0]);
mutex_unlock(&instance->vchi_mutex);
exit:
- LOG_DBG(" .. OUT\n");
return ret;
}
int status;
int ret;
- LOG_DBG(" .. IN\n");
LOG_INFO(" Setting ALSA dest(%d), volume(%d)\n",
chip->dest, chip->volume);
vchi_service_release(instance->vchi_handle[0]);
mutex_unlock(&instance->vchi_mutex);
- LOG_DBG(" .. OUT\n");
return ret;
}
int i;
int ret = 0;
- LOG_DBG(" .. IN\n");
LOG_DBG(" Setting ALSA dest(%d), volume(%d)\n", chip->dest, chip->volume);
/* change ctls for all substreams */
}
}
}
- LOG_DBG(" .. OUT ret=%d\n", ret);
return ret;
}
int status;
int ret;
- LOG_DBG(" .. IN\n");
LOG_INFO(" Setting ALSA channels(%d), samplerate(%d), bits-per-sample(%d)\n",
channels, samplerate, bps);
vchi_service_release(instance->vchi_handle[0]);
mutex_unlock(&instance->vchi_mutex);
- LOG_DBG(" .. OUT\n");
return ret;
}
int bcm2835_audio_setup(struct bcm2835_alsa_stream *alsa_stream)
{
- LOG_DBG(" .. IN\n");
- LOG_DBG(" .. OUT\n");
return 0;
}
int status;
int ret;
- LOG_DBG(" .. IN\n");
if (mutex_lock_interruptible(&instance->vchi_mutex)) {
LOG_DBG("Interrupted whilst waiting for lock on (%d)\n",
unlock:
vchi_service_release(instance->vchi_handle[0]);
mutex_unlock(&instance->vchi_mutex);
- LOG_DBG(" .. OUT\n");
return ret;
}
int status;
int ret;
- LOG_DBG(" .. IN\n");
if (mutex_lock_interruptible(&instance->vchi_mutex)) {
LOG_DBG("Interrupted whilst waiting for lock on (%d)\n",
unlock:
vchi_service_release(instance->vchi_handle[0]);
mutex_unlock(&instance->vchi_mutex);
- LOG_DBG(" .. OUT\n");
return ret;
}
int status;
int ret;
- LOG_DBG(" .. IN\n");
my_workqueue_quit(alsa_stream);
vc_vchi_audio_deinit(instance);
alsa_stream->instance = NULL;
- LOG_DBG(" .. OUT\n");
return ret;
}
int status;
int ret;
- LOG_DBG(" .. IN\n");
LOG_INFO(" Writing %d bytes from %p\n", count, src);
unlock:
vchi_service_release(instance->vchi_handle[0]);
mutex_unlock(&instance->vchi_mutex);
- LOG_DBG(" .. OUT\n");
return ret;
}
*/
void bcm2835_audio_flush_buffers(struct bcm2835_alsa_stream *alsa_stream)
{
- LOG_DBG(" .. IN\n");
- LOG_DBG(" .. OUT\n");
}
/**
*/
void bcm2835_audio_flush_playback_buffers(struct bcm2835_alsa_stream *alsa_stream)
{
- LOG_DBG(" .. IN\n");
- LOG_DBG(" .. OUT\n");
}
unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream)