Skip to content

Commit d274376

Browse files
committed
Remove silence method, and use atomic flags for kmalloc
1 parent cc5758b commit d274376

2 files changed

Lines changed: 2 additions & 26 deletions

File tree

‎sound/arm/bcm2835-pcm.c‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -345,29 +345,6 @@ static int snd_bcm2835_pcm_copy(struct snd_pcm_substream *substream,
345345
return ret;
346346
}
347347

348-
static int snd_bcm2835_pcm_silence(struct snd_pcm_substream *substream,
349-
int channel, snd_pcm_uframes_t post,
350-
snd_pcm_uframes_t count)
351-
{
352-
int ret;
353-
struct snd_pcm_runtime *runtime = substream->runtime;
354-
bcm2835_alsa_stream_t *alsa_stream = runtime->private_data;
355-
356-
audio_info(" .. IN\n");
357-
audio_debug("silence....... (%d) hwptr=%d appl=%d pos=%d\n",
358-
frames_to_bytes(runtime, count), frames_to_bytes(runtime,
359-
runtime->
360-
status->
361-
hw_ptr),
362-
frames_to_bytes(runtime, runtime->control->appl_ptr),
363-
alsa_stream->pos);
364-
ret =
365-
bcm2835_audio_write(alsa_stream, frames_to_bytes(runtime, count),
366-
NULL);
367-
audio_info(" .. OUT\n");
368-
return ret;
369-
}
370-
371348
static int snd_bcm2835_pcm_lib_ioctl(struct snd_pcm_substream *substream,
372349
unsigned int cmd, void *arg)
373350
{
@@ -388,7 +365,6 @@ static struct snd_pcm_ops snd_bcm2835_playback_ops = {
388365
.trigger = snd_bcm2835_pcm_trigger,
389366
.pointer = snd_bcm2835_pcm_pointer,
390367
.copy = snd_bcm2835_pcm_copy,
391-
.silence = snd_bcm2835_pcm_silence,
392368
};
393369

394370
/* create a pcm device */

‎sound/arm/bcm2835-vchiq.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ int bcm2835_audio_start(bcm2835_alsa_stream_t * alsa_stream)
102102
int ret = -1;
103103
LOG_DBG(" .. IN\n");
104104
if (alsa_stream->my_wq) {
105-
my_work_t *work = kmalloc(sizeof(my_work_t), GFP_KERNEL);
105+
my_work_t *work = kmalloc(sizeof(my_work_t), GFP_ATOMIC);
106106
/* Queue some work (item 1) */
107107
if (work) {
108108
INIT_WORK((struct work_struct *)work, my_wq_function);
@@ -123,7 +123,7 @@ int bcm2835_audio_stop(bcm2835_alsa_stream_t * alsa_stream)
123123
int ret = -1;
124124
LOG_DBG(" .. IN\n");
125125
if (alsa_stream->my_wq) {
126-
my_work_t *work = kmalloc(sizeof(my_work_t), GFP_KERNEL);
126+
my_work_t *work = kmalloc(sizeof(my_work_t), GFP_ATOMIC);
127127
/* Queue some work (item 1) */
128128
if (work) {
129129
INIT_WORK((struct work_struct *)work, my_wq_function);

0 commit comments

Comments
 (0)