qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] Intel HDA and DMA


From: Mathieu Barbe
Subject: [Qemu-discuss] Intel HDA and DMA
Date: Fri, 4 May 2018 16:08:58 +0200

Hi everyone,
I'm new here and I'm a computer science student.

I have a issue with my personal OS.

We started  from scratch but now we have a very good base with virtual
memory, processes and a user / kernel space.

We wanted to go further with Intel HDA Audio.
We spent a lot of time figuring out how to configure the sound card but
we finally understood.

Despite our many attempts, no sound.

After compiling Qemu with debug option, we were able to execute step by
step through gdb.

The audio Controller, stream and DAC configuration looks good.
The problem occurs when starting the stream, in the intel_hda.c file :

intel_hda_parse_bdl(IntelHDAState *d, IntelHDAStream *st)

Here, a local copy of the Buffer Descriptor List Entry is copied through
the DMA:

for (i = 0; i < st->bentries; i++, addr += 16) {
       pci_dma_read(&d->pci, addr, buf, 16);
        st->bpl[i].addr = le64_to_cpu(*(uint64_t *)buf);
        st->bpl[i].len = le32_to_cpu(*(uint32_t *)(buf + 8));
        st->bpl[i].flags = le32_to_cpu(*(uint32_t *)(buf + 12));
        dprint(d, 1, "bdl/%d: 0x%" PRIx64 " +0x%x, 0x%x\n",
               i, st->bpl[i].addr, st->bpl[i].len, st->bpl[i].flags);
    }

The address used in pci_dma_read function is the correct one, but the
return buffer is empty.
The structure is really in memory, I could check it with gdb and my kernel.

If I replace the pci_dma_read function with :
        cpu_physical_memory_read(addr, buf, 16);

It works, buffer containing my data.
It seems that the sound card cannot access at memory through the DMA.

Can you tell me if we forgot to configure something for PCI DMA?
Maybe we should configure it?

Thank you for your help.
Sincerely
Matthew


Translated with www.DeepL.com/Translator



reply via email to

[Prev in Thread] Current Thread [Next in Thread]