Skip to content

Commit

Permalink
virtio-snd: remove @alexbr comments
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Brown <[email protected]>
  • Loading branch information
alexandermbrown committed May 9, 2024
1 parent 3bceded commit ba288af
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion examples/virtio-snd/snd_driver_vmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ uintptr_t guest_ram_vaddr;

#define SND_CLIENT_CH 4

// @alexbr: why 50?
#define UIO_SND_IRQ 50

#define MAX_IRQ_CH 63
Expand Down
4 changes: 1 addition & 3 deletions src/virtio/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ static int virtio_snd_mmio_set_driver_features(struct virtio_device *dev, uint32

static int virtio_snd_mmio_get_device_config(struct virtio_device *dev, uint32_t offset, uint32_t *ret_val)
{
// @alexbr: duplicated from block. can we abstract this?
struct virtio_snd_device *state = device_state(dev);
uintptr_t config_base_addr = (uintptr_t)&state->config;
uintptr_t config_field_offset = (uintptr_t)(offset - REG_VIRTIO_MMIO_CONFIG);
Expand Down Expand Up @@ -141,7 +140,7 @@ static uint64_t virtio_formats_from_sddf(uint64_t formats)
{
uint64_t result = 0;

// @alexbr: Currently the enums are identical, but explicitly converting
// Currently the enums are identical, but explicitly converting
// allows us to change the enum values in the future.
convert_flag(&result, VIRTIO_SND_PCM_FMT_IMA_ADPCM, formats, SOUND_PCM_FMT_IMA_ADPCM);
convert_flag(&result, VIRTIO_SND_PCM_FMT_MU_LAW, formats, SOUND_PCM_FMT_MU_LAW);
Expand Down Expand Up @@ -615,7 +614,6 @@ static int virtio_snd_mmio_queue_notify(struct virtio_device *dev)
struct virtio_snd_device *state = device_state(dev);

if (dev->data.QueueSel > VIRTIO_SND_NUM_VIRTQ) {
// @alexbr: handle error appropriately
LOG_SOUND_ERR("Invalid queue\n");
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/linux/uio_drivers/snd/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static int flush_pcm(stream_t *stream, int max_count)
{
int response_count = 0;

// @alexbr: for some reason this is needed for mmap to work
// For some reason this is needed for mmap to work
snd_pcm_avail(stream->handle);

while (!queue_empty(stream->pcm_req) && max_count-- > 0) {
Expand Down

0 comments on commit ba288af

Please sign in to comment.