On Wed, Jun 24, 2009 at 23:29, Jacob Meuser<[email protected]> wrote:
> only 4 people have ati or nvidia azalia(4)?
>
> On Tue, Jun 23, 2009 at 01:42:49AM +0000, Jacob Meuser wrote:
>> On Sun, Jun 21, 2009 at 01:07:37AM +0000, Jacob Meuser wrote:
>> > On Mon, Feb 09, 2009 at 12:40:31AM +0000, Owain Ainsworth wrote:
>> > > On Sun, Feb 08, 2009 at 05:11:16PM -0500, Brad wrote:
>> > > > Please test the following diff with any azalia(4) adapter, but
especially
>> > > > with any ATI or NVIDIA chipsets. Make sure sound still works
properly
>> > > > without any unusual sound artifacts.
>> > >
>> > > Surely this isn't much of an improvement. At least only map uncached
>> > > on the hardware that needs it. Why give non-broken chips the cpu-time
>> > > hit?
>> >
>> > I recently got some reports of broken sound with azalia, all with
>> > amd64.mp with nVidia chipsets. B at least two of the reports said
>> > that this is a new problem, that the devices were working properly
>> > a couple months ago. B one (not sure if it was working before) was
>> > fixed by switching from enabling pcie snoop to enabling
>> > BUS_DMA_NOCACHE. B haven't heard back from the others yet.
>> >
>> > please test the following if you have ATI or NVIDIA chipsets.
>>
>> haven't gotten much feedback on this one ...
>
> --
> [email protected]
> SDF Public Access UNIX System - http://sdf.lonestar.org
>
> Index: azalia.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/azalia.c,v
> retrieving revision 1.140
> diff -u -p azalia.c
> --- azalia.c B  B 18 Jun 2009 08:19:03 -0000 B  B  B 1.140
> +++ azalia.c B  B 20 Jun 2009 11:01:18 -0000
> @@ -143,6 +143,7 @@ typedef struct azalia_t {
> B  B  B  B bus_dma_tag_t dmat;
> B  B  B  B pcireg_t pciid;
> B  B  B  B uint32_t subid;
> + B  B  B  int dma_nocache;
>
> B  B  B  B codec_t codecs[15];
> B  B  B  B int ncodecs; B  B  B  B  B  B /* number of codecs */
> @@ -361,7 +362,6 @@ azalia_pci_attach(struct device *parent, struct device
> B  B  B  B pcireg_t v;
> B  B  B  B pci_intr_handle_t ih;
> B  B  B  B const char *interrupt_str;
> - B  B  B  uint8_t reg;
>
> B  B  B  B sc = (azalia_t*)self;
> B  B  B  B pa = aux;
> @@ -384,15 +384,10 @@ azalia_pci_attach(struct device *parent, struct
device
> B  B  B  B v = pci_conf_read(pa->pa_pc, pa->pa_tag, 0x44);
> B  B  B  B pci_conf_write(pa->pa_pc, pa->pa_tag, 0x44, v & (~0x7));
>
> - B  B  B  /* enable PCIe snoop */
> + B  B  B  sc->dma_nocache = 0;
> B  B  B  B switch (PCI_PRODUCT(pa->pa_id)) {
> B  B  B  B case PCI_PRODUCT_ATI_SB450_HDA:
> B  B  B  B case PCI_PRODUCT_ATI_SBX00_HDA:
> - B  B  B  B  B  B  B  reg = azalia_pci_read(pa->pa_pc, pa->pa_tag,
ATI_PCIE_SNOOP_REG);
> - B  B  B  B  B  B  B  reg &= ATI_PCIE_SNOOP_MASK;
> - B  B  B  B  B  B  B  reg |= ATI_PCIE_SNOOP_ENABLE;
> - B  B  B  B  B  B  B  azalia_pci_write(pa->pa_pc, pa->pa_tag,
ATI_PCIE_SNOOP_REG, reg);
> - B  B  B  B  B  B  B  break;
> B  B  B  B case PCI_PRODUCT_NVIDIA_MCP51_HDA:
> B  B  B  B case PCI_PRODUCT_NVIDIA_MCP55_HDA:
> B  B  B  B case PCI_PRODUCT_NVIDIA_MCP61_HDA_1:
> @@ -415,10 +410,7 @@ azalia_pci_attach(struct device *parent, struct device
> B  B  B  B case PCI_PRODUCT_NVIDIA_MCP89_HDA_2:
> B  B  B  B case PCI_PRODUCT_NVIDIA_MCP89_HDA_3:
> B  B  B  B case PCI_PRODUCT_NVIDIA_MCP89_HDA_4:
> - B  B  B  B  B  B  B  reg = azalia_pci_read(pa->pa_pc, pa->pa_tag,
NVIDIA_PCIE_SNOOP_REG);
> - B  B  B  B  B  B  B  reg &= NVIDIA_PCIE_SNOOP_MASK;
> - B  B  B  B  B  B  B  reg |= NVIDIA_PCIE_SNOOP_ENABLE;
> - B  B  B  B  B  B  B  azalia_pci_write(pa->pa_pc, pa->pa_tag,
NVIDIA_PCIE_SNOOP_REG, reg);
> + B  B  B  B  B  B  B  sc->dma_nocache = BUS_DMA_NOCACHE;
> B  B  B  B  B  B  B  B break;
> B  B  B  B }
>
> @@ -1109,7 +1101,7 @@ azalia_alloc_dmamem(azalia_t *az, size_t size, size_t
> B  B  B  B if (nsegs != 1)
> B  B  B  B  B  B  B  B goto free;
> B  B  B  B err = bus_dmamem_map(az->dmat, d->segments, 1, size,
> - B  B  B  B  B  &d->addr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT);
> + B  B  B  B  B  &d->addr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT |
az->dma_nocache);
> B  B  B  B if (err)
> B  B  B  B  B  B  B  B goto free;
> B  B  B  B err = bus_dmamap_create(az->dmat, size, 1, size, 0,
>
>

sorry,


azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x02:
apic 2 int 21 (irq 9)
azalia0: codecs: Sigmatel STAC9205X, Conexant/0x2c06, using Sigmatel
STAC9205X
audio0 at azalia0


Mine has been working famously since the May 6th snapshot.  Before
that, I would get audio that would get all warbled (flac, ogg).  Now,
it's all good.  You and the rest of the devs never cease to amaze
me...

Regards,
Bryan Brake

Reply via email to