Changeset 772 for GPL/trunk/alsa-kernel/include/sound/hdaudio.h
- Timestamp:
- Apr 19, 2025, 8:08:37 PM (4 months ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-6.6-LTS (added) merged: 765,768-769 /GPL/branches/uniaud32-exp (added) merged: 735-741,743-744,748-751,753-760,762-764 /GPL/branches/uniaud32-next merged: 718-734
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/include/sound/hdaudio.h
r695 r772 10 10 #include <linux/interrupt.h> 11 11 #include <linux/io.h> 12 #include <linux/io-64-nonatomic-lo-hi.h> 13 #include <linux/iopoll.h> 14 #include <linux/pci.h> 12 15 #include <linux/pm_runtime.h> 13 16 #include <linux/timecounter.h> … … 93 96 bool caps_overwriting:1; /* caps overwrite being in process */ 94 97 bool cache_coef:1; /* cache COEF read/write too */ 98 unsigned int registered:1; /* codec was registered */ 95 99 }; 96 100 … … 121 125 void snd_hdac_device_unregister(struct hdac_device *codec); 122 126 int snd_hdac_device_set_chip_name(struct hdac_device *codec, const char *name); 123 int snd_hdac_codec_modalias( struct hdac_device *hdac, char *buf, size_t size);127 int snd_hdac_codec_modalias(const struct hdac_device *hdac, char *buf, size_t size); 124 128 125 129 int snd_hdac_refresh_widgets(struct hdac_device *codec); … … 356 360 bool polling_mode:1; 357 361 bool needs_damn_long_delay:1; 362 bool not_use_interrupts:1; /* prohibiting the RIRB IRQ */ 363 bool access_sdnctl_in_dword:1; /* accessing the sdnctl register by dword */ 358 364 359 365 int poll_count; … … 460 466 #define snd_hdac_reg_writel(bus, addr, val) writel(val, addr) 461 467 #define snd_hdac_reg_readl(bus, addr) readl(addr) 468 #define snd_hdac_reg_writeq(bus, addr, val) writeq(val, addr) 469 #define snd_hdac_reg_readq(bus, addr) readq(addr) 462 470 463 471 /* … … 502 510 (snd_hdac_chip_readb(chip, reg) & ~(mask)) | (val)) 503 511 512 /* update register macro */ 513 #define snd_hdac_updatel(addr, reg, mask, val) \ 514 writel(((readl(addr + reg) & ~(mask)) | (val)), addr + reg) 515 516 #define snd_hdac_updatew(addr, reg, mask, val) \ 517 writew(((readw(addr + reg) & ~(mask)) | (val)), addr + reg) 518 504 519 /* 505 520 * HD-audio stream … … 521 536 522 537 void __iomem *sd_addr; /* stream descriptor pointer */ 538 539 void __iomem *spib_addr; /* software position in buffers stream pointer */ 540 void __iomem *fifo_addr; /* software position Max fifos stream pointer */ 541 542 void __iomem *dpibr_addr; /* DMA position in buffer resume pointer */ 543 u32 dpib; /* DMA position in buffer */ 544 u32 lpib; /* Linear position in buffer */ 523 545 524 546 u32 sd_int_sta_mask; /* stream int status mask */ … … 561 583 struct hdac_stream *snd_hdac_stream_assign(struct hdac_bus *bus, 562 584 struct snd_pcm_substream *substream); 585 void snd_hdac_stream_release_locked(struct hdac_stream *azx_dev); 563 586 void snd_hdac_stream_release(struct hdac_stream *azx_dev); 564 587 struct hdac_stream *snd_hdac_get_stream(struct hdac_bus *bus, … … 570 593 int snd_hdac_stream_set_params(struct hdac_stream *azx_dev, 571 594 unsigned int format_val); 572 void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start); 573 void snd_hdac_stream_clear(struct hdac_stream *azx_dev); 595 void snd_hdac_stream_start(struct hdac_stream *azx_dev); 574 596 void snd_hdac_stream_stop(struct hdac_stream *azx_dev); 597 void snd_hdac_stop_streams(struct hdac_bus *bus); 598 void snd_hdac_stop_streams_and_chip(struct hdac_bus *bus); 575 599 void snd_hdac_stream_reset(struct hdac_stream *azx_dev); 576 600 void snd_hdac_stream_sync_trigger(struct hdac_stream *azx_dev, bool set, … … 582 606 int snd_hdac_get_stream_stripe_ctl(struct hdac_bus *bus, 583 607 struct snd_pcm_substream *substream); 608 609 void snd_hdac_stream_spbcap_enable(struct hdac_bus *chip, 610 bool enable, int index); 611 int snd_hdac_stream_set_spib(struct hdac_bus *bus, 612 struct hdac_stream *azx_dev, u32 value); 613 int snd_hdac_stream_get_spbmaxfifo(struct hdac_bus *bus, 614 struct hdac_stream *azx_dev); 615 void snd_hdac_stream_drsm_enable(struct hdac_bus *bus, 616 bool enable, int index); 617 int snd_hdac_stream_wait_drsm(struct hdac_stream *azx_dev); 618 int snd_hdac_stream_set_dpibr(struct hdac_bus *bus, 619 struct hdac_stream *azx_dev, u32 value); 620 int snd_hdac_stream_set_lpib(struct hdac_stream *azx_dev, u32 value); 584 621 585 622 /* … … 599 636 #define snd_hdac_stream_readb(dev, reg) \ 600 637 snd_hdac_reg_readb((dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg) 638 #define snd_hdac_stream_readb_poll(dev, reg, val, cond, delay_us, timeout_us) \ 639 read_poll_timeout_atomic(snd_hdac_reg_readb, val, cond, delay_us, timeout_us, \ 640 false, (dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg) 641 #define snd_hdac_stream_readl_poll(dev, reg, val, cond, delay_us, timeout_us) \ 642 read_poll_timeout_atomic(snd_hdac_reg_readl, val, cond, delay_us, timeout_us, \ 643 false, (dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg) 601 644 602 645 /* update a register, pass without AZX_REG_ prefix */ … … 677 720 (ptr) = snd_array_elem(array, ++(idx))) 678 721 722 /* 723 * Device matching 724 */ 725 726 #ifndef TARGET_OS2 727 #define HDA_CONTROLLER_IS_HSW(pci) (pci_match_id((struct pci_device_id []){ \ 728 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_HSW_0) }, \ 729 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_HSW_2) }, \ 730 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_HSW_3) }, \ 731 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_BDW) }, \ 732 { } \ 733 }, pci)) 734 735 #define HDA_CONTROLLER_IS_APL(pci) (pci_match_id((struct pci_device_id []){ \ 736 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_APL) }, \ 737 { } \ 738 }, pci)) 739 740 #define HDA_CONTROLLER_IN_GPU(pci) (pci_match_id((struct pci_device_id []){ \ 741 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_DG1) }, \ 742 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_DG2_0) }, \ 743 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_DG2_1) }, \ 744 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_DG2_2) }, \ 745 { } \ 746 }, pci) || HDA_CONTROLLER_IS_HSW(pci)) 747 #else 748 #define HDA_CONTROLLER_IS_HSW(pci) 0 749 #define HDA_CONTROLLER_IS_APL(pci) 0 750 #define HDA_CONTROLLER_IN_GPU(pci) 0 751 #endif 679 752 #endif /* __SOUND_HDAUDIO_H */
Note:
See TracChangeset
for help on using the changeset viewer.