diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-14 17:10:30 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-14 17:10:30 -0400 |
| commit | 747f62305dfb8a592835c7401069bfdbc06acbae (patch) | |
| tree | 5123b38238c489be1407202b138cdbbb31198f51 /include/linux | |
| parent | 2c20443ec221dcb76484b30933593e8ecd836bbd (diff) | |
| parent | f5b6c1fcb42fe7d6f2f6eb2220512e2a5f875133 (diff) | |
Merge tag 'sound-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"It's been busy summer weeks and hence lots of changes, partly for a
few new drivers and partly for a wide range of fixes.
Here are highlights:
ALSA Core:
- Fix rawmidi buffer management, code cleanup / refactoring
- Fix the SG-buffer page handling with incorrect fallback size
- Fix the stall at virmidi trigger callback with a large buffer; also
offloading and code-refactoring along with it
- Various ALSA sequencer code cleanups
ASoC:
- Deploy the standard snd_pcm_stop_xrun() helper in several drivers
- Support for providing name prefixes to generic component nodes
- Quite a few fixes for DPCM as it gains a bit wider use and more
robust testing
- Generalization of the DIO2125 support to a simple amplifier driver
- Accessory detection support for the audio graph card
- DT support for PXA AC'97 devices
- Quirks for a number of new x86 systems
- Support for AM Logic Meson, Everest ES7154, Intel systems with
RT5682, Qualcomm QDSP6 and WCD9335, Realtek RT5682 and TI TAS5707
HD-audio:
- Code refactoring in HD-audio ext codec codes to drop own classes;
preliminary works for the upcoming legacy codec support
- Generalized DRM audio component for the upcoming radeon / amdgpu
support
- Unification of mic mute-LED and GPIO support for various codecs
- Further improvement of CA0132 codec support including Recon3D
- Proper vga_switcheroo handling for AMD i-GPU
- Update of model list in documentation
- Fixups for another HP Spectre x360, Conexant codecs, power-save
blacklist update
USB-audio:
- Fix the invalid sample rate setup with external clock
- Support of UAC3 selector units and processing units
- Basic UAC3 power-domain support
- Support for Encore mDSD and Thesycon-based DSD devices
- Preparation for future complete callback changes
Firewire:
- Add support for MOTU Traveler
Misc:
- The endianess notation fixes in various drivers
- Add fall-through comment in lots of drivers
- Various sparse warning fixes, e.g. about PCM format types"
* tag 'sound-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (529 commits)
ASoC: adav80x: mark expected switch fall-through
ASoC: da7219: Add delays to capture path to remove DC offset noise
ALSA: usb-audio: Mark expected switch fall-through
ALSA: mixart: Mark expected switch fall-through
ALSA: opl3: Mark expected switch fall-through
ALSA: hda/ca0132 - Add exit commands for Recon3D
ALSA: hda/ca0132 - Change mixer controls for Recon3D
ALSA: hda/ca0132 - Add Recon3D input and output select commands
ALSA: hda/ca0132 - Add DSP setup defaults for Recon3D
ALSA: hda/ca0132 - Add Recon3D startup functions and setup
ALSA: hda/ca0132 - Add bool variable to enable/disable pci region2 mmio
ALSA: hda/ca0132 - Add Recon3D pincfg
ALSA: hda/ca0132 - Add quirk ID and enum for Recon3D
ALSA: hda/ca0132 - Add alt_functions unsolicited response
ALSA: hda/ca0132 - Clean up ca0132_init function.
ALSA: hda/ca0132 - Create mmio gpio function to make code clearer
ASoC: wm_adsp: Make DSP name configurable by codec driver
ASoC: wm_adsp: Declare firmware controls from codec driver
ASoC: max98373: Added software reset register to readable registers
ASoC: wm_adsp: Correct DSP pointer for preloader control
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clk-provider.h | 26 | ||||
| -rw-r--r-- | include/linux/clk.h | 33 | ||||
| -rw-r--r-- | include/linux/dma/pxa-dma.h | 9 | ||||
| -rw-r--r-- | include/linux/platform_data/mmp_dma.h | 4 | ||||
| -rw-r--r-- | include/linux/pxa2xx_ssp.h | 10 | ||||
| -rw-r--r-- | include/linux/usb/audio-v3.h | 19 | ||||
| -rw-r--r-- | include/linux/vga_switcheroo.h | 8 |
7 files changed, 103 insertions, 6 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index b7cfa037e593..08b1aa70a38d 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -38,6 +38,8 @@ | |||
| 38 | #define CLK_IS_CRITICAL BIT(11) /* do not gate, ever */ | 38 | #define CLK_IS_CRITICAL BIT(11) /* do not gate, ever */ |
| 39 | /* parents need enable during gate/ungate, set rate and re-parent */ | 39 | /* parents need enable during gate/ungate, set rate and re-parent */ |
| 40 | #define CLK_OPS_PARENT_ENABLE BIT(12) | 40 | #define CLK_OPS_PARENT_ENABLE BIT(12) |
| 41 | /* duty cycle call may be forwarded to the parent clock */ | ||
| 42 | #define CLK_DUTY_CYCLE_PARENT BIT(13) | ||
| 41 | 43 | ||
| 42 | struct clk; | 44 | struct clk; |
| 43 | struct clk_hw; | 45 | struct clk_hw; |
| @@ -67,6 +69,17 @@ struct clk_rate_request { | |||
| 67 | }; | 69 | }; |
| 68 | 70 | ||
| 69 | /** | 71 | /** |
| 72 | * struct clk_duty - Struture encoding the duty cycle ratio of a clock | ||
| 73 | * | ||
| 74 | * @num: Numerator of the duty cycle ratio | ||
| 75 | * @den: Denominator of the duty cycle ratio | ||
| 76 | */ | ||
| 77 | struct clk_duty { | ||
| 78 | unsigned int num; | ||
| 79 | unsigned int den; | ||
| 80 | }; | ||
| 81 | |||
| 82 | /** | ||
| 70 | * struct clk_ops - Callback operations for hardware clocks; these are to | 83 | * struct clk_ops - Callback operations for hardware clocks; these are to |
| 71 | * be provided by the clock implementation, and will be called by drivers | 84 | * be provided by the clock implementation, and will be called by drivers |
| 72 | * through the clk_* api. | 85 | * through the clk_* api. |
| @@ -169,6 +182,15 @@ struct clk_rate_request { | |||
| 169 | * by the second argument. Valid values for degrees are | 182 | * by the second argument. Valid values for degrees are |
| 170 | * 0-359. Return 0 on success, otherwise -EERROR. | 183 | * 0-359. Return 0 on success, otherwise -EERROR. |
| 171 | * | 184 | * |
| 185 | * @get_duty_cycle: Queries the hardware to get the current duty cycle ratio | ||
| 186 | * of a clock. Returned values denominator cannot be 0 and must be | ||
| 187 | * superior or equal to the numerator. | ||
| 188 | * | ||
| 189 | * @set_duty_cycle: Apply the duty cycle ratio to this clock signal specified by | ||
| 190 | * the numerator (2nd argurment) and denominator (3rd argument). | ||
| 191 | * Argument must be a valid ratio (denominator > 0 | ||
| 192 | * and >= numerator) Return 0 on success, otherwise -EERROR. | ||
| 193 | * | ||
| 172 | * @init: Perform platform-specific initialization magic. | 194 | * @init: Perform platform-specific initialization magic. |
| 173 | * This is not not used by any of the basic clock types. | 195 | * This is not not used by any of the basic clock types. |
| 174 | * Please consider other ways of solving initialization problems | 196 | * Please consider other ways of solving initialization problems |
| @@ -218,6 +240,10 @@ struct clk_ops { | |||
| 218 | unsigned long parent_accuracy); | 240 | unsigned long parent_accuracy); |
| 219 | int (*get_phase)(struct clk_hw *hw); | 241 | int (*get_phase)(struct clk_hw *hw); |
| 220 | int (*set_phase)(struct clk_hw *hw, int degrees); | 242 | int (*set_phase)(struct clk_hw *hw, int degrees); |
| 243 | int (*get_duty_cycle)(struct clk_hw *hw, | ||
| 244 | struct clk_duty *duty); | ||
| 245 | int (*set_duty_cycle)(struct clk_hw *hw, | ||
| 246 | struct clk_duty *duty); | ||
| 221 | void (*init)(struct clk_hw *hw); | 247 | void (*init)(struct clk_hw *hw); |
| 222 | void (*debug_init)(struct clk_hw *hw, struct dentry *dentry); | 248 | void (*debug_init)(struct clk_hw *hw, struct dentry *dentry); |
| 223 | }; | 249 | }; |
diff --git a/include/linux/clk.h b/include/linux/clk.h index 0dbd0885b2c2..4f750c481b82 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h | |||
| @@ -142,6 +142,27 @@ int clk_set_phase(struct clk *clk, int degrees); | |||
| 142 | int clk_get_phase(struct clk *clk); | 142 | int clk_get_phase(struct clk *clk); |
| 143 | 143 | ||
| 144 | /** | 144 | /** |
| 145 | * clk_set_duty_cycle - adjust the duty cycle ratio of a clock signal | ||
| 146 | * @clk: clock signal source | ||
| 147 | * @num: numerator of the duty cycle ratio to be applied | ||
| 148 | * @den: denominator of the duty cycle ratio to be applied | ||
| 149 | * | ||
| 150 | * Adjust the duty cycle of a clock signal by the specified ratio. Returns 0 on | ||
| 151 | * success, -EERROR otherwise. | ||
| 152 | */ | ||
| 153 | int clk_set_duty_cycle(struct clk *clk, unsigned int num, unsigned int den); | ||
| 154 | |||
| 155 | /** | ||
| 156 | * clk_get_duty_cycle - return the duty cycle ratio of a clock signal | ||
| 157 | * @clk: clock signal source | ||
| 158 | * @scale: scaling factor to be applied to represent the ratio as an integer | ||
| 159 | * | ||
| 160 | * Returns the duty cycle ratio multiplied by the scale provided, otherwise | ||
| 161 | * returns -EERROR. | ||
| 162 | */ | ||
| 163 | int clk_get_scaled_duty_cycle(struct clk *clk, unsigned int scale); | ||
| 164 | |||
| 165 | /** | ||
| 145 | * clk_is_match - check if two clk's point to the same hardware clock | 166 | * clk_is_match - check if two clk's point to the same hardware clock |
| 146 | * @p: clk compared against q | 167 | * @p: clk compared against q |
| 147 | * @q: clk compared against p | 168 | * @q: clk compared against p |
| @@ -183,6 +204,18 @@ static inline long clk_get_phase(struct clk *clk) | |||
| 183 | return -ENOTSUPP; | 204 | return -ENOTSUPP; |
| 184 | } | 205 | } |
| 185 | 206 | ||
| 207 | static inline int clk_set_duty_cycle(struct clk *clk, unsigned int num, | ||
| 208 | unsigned int den) | ||
| 209 | { | ||
| 210 | return -ENOTSUPP; | ||
| 211 | } | ||
| 212 | |||
| 213 | static inline unsigned int clk_get_scaled_duty_cycle(struct clk *clk, | ||
| 214 | unsigned int scale) | ||
| 215 | { | ||
| 216 | return 0; | ||
| 217 | } | ||
| 218 | |||
| 186 | static inline bool clk_is_match(const struct clk *p, const struct clk *q) | 219 | static inline bool clk_is_match(const struct clk *p, const struct clk *q) |
| 187 | { | 220 | { |
| 188 | return p == q; | 221 | return p == q; |
diff --git a/include/linux/dma/pxa-dma.h b/include/linux/dma/pxa-dma.h index e56ec7af4fd7..9fc594f69eff 100644 --- a/include/linux/dma/pxa-dma.h +++ b/include/linux/dma/pxa-dma.h | |||
| @@ -9,6 +9,15 @@ enum pxad_chan_prio { | |||
| 9 | PXAD_PRIO_LOWEST, | 9 | PXAD_PRIO_LOWEST, |
| 10 | }; | 10 | }; |
| 11 | 11 | ||
| 12 | /** | ||
| 13 | * struct pxad_param - dma channel request parameters | ||
| 14 | * @drcmr: requestor line number | ||
| 15 | * @prio: minimal mandatory priority of the channel | ||
| 16 | * | ||
| 17 | * If a requested channel is granted, its priority will be at least @prio, | ||
| 18 | * ie. if PXAD_PRIO_LOW is required, the requested channel will be either | ||
| 19 | * PXAD_PRIO_LOW, PXAD_PRIO_NORMAL or PXAD_PRIO_HIGHEST. | ||
| 20 | */ | ||
| 12 | struct pxad_param { | 21 | struct pxad_param { |
| 13 | unsigned int drcmr; | 22 | unsigned int drcmr; |
| 14 | enum pxad_chan_prio prio; | 23 | enum pxad_chan_prio prio; |
diff --git a/include/linux/platform_data/mmp_dma.h b/include/linux/platform_data/mmp_dma.h index d1397c8ed94e..6397b9c8149a 100644 --- a/include/linux/platform_data/mmp_dma.h +++ b/include/linux/platform_data/mmp_dma.h | |||
| @@ -12,9 +12,13 @@ | |||
| 12 | #ifndef MMP_DMA_H | 12 | #ifndef MMP_DMA_H |
| 13 | #define MMP_DMA_H | 13 | #define MMP_DMA_H |
| 14 | 14 | ||
| 15 | struct dma_slave_map; | ||
| 16 | |||
| 15 | struct mmp_dma_platdata { | 17 | struct mmp_dma_platdata { |
| 16 | int dma_channels; | 18 | int dma_channels; |
| 17 | int nb_requestors; | 19 | int nb_requestors; |
| 20 | int slave_map_cnt; | ||
| 21 | const struct dma_slave_map *slave_map; | ||
| 18 | }; | 22 | }; |
| 19 | 23 | ||
| 20 | #endif /* MMP_DMA_H */ | 24 | #endif /* MMP_DMA_H */ |
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h index 8461b18e4608..13b4244d44c1 100644 --- a/include/linux/pxa2xx_ssp.h +++ b/include/linux/pxa2xx_ssp.h | |||
| @@ -171,6 +171,14 @@ | |||
| 171 | #define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */ | 171 | #define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */ |
| 172 | #define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */ | 172 | #define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */ |
| 173 | #define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */ | 173 | #define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */ |
| 174 | #define SSACD_ACDS_1 (0) | ||
| 175 | #define SSACD_ACDS_2 (1) | ||
| 176 | #define SSACD_ACDS_4 (2) | ||
| 177 | #define SSACD_ACDS_8 (3) | ||
| 178 | #define SSACD_ACDS_16 (4) | ||
| 179 | #define SSACD_ACDS_32 (5) | ||
| 180 | #define SSACD_SCDB_4X (0) | ||
| 181 | #define SSACD_SCDB_1X (1) | ||
| 174 | #define SSACD_SCDX8 (1 << 7) /* SYSCLK division ratio select */ | 182 | #define SSACD_SCDX8 (1 << 7) /* SYSCLK division ratio select */ |
| 175 | 183 | ||
| 176 | /* LPSS SSP */ | 184 | /* LPSS SSP */ |
| @@ -212,8 +220,6 @@ struct ssp_device { | |||
| 212 | int type; | 220 | int type; |
| 213 | int use_count; | 221 | int use_count; |
| 214 | int irq; | 222 | int irq; |
| 215 | int drcmr_rx; | ||
| 216 | int drcmr_tx; | ||
| 217 | 223 | ||
| 218 | struct device_node *of_node; | 224 | struct device_node *of_node; |
| 219 | }; | 225 | }; |
diff --git a/include/linux/usb/audio-v3.h b/include/linux/usb/audio-v3.h index a710e28b5215..6b708434b7f9 100644 --- a/include/linux/usb/audio-v3.h +++ b/include/linux/usb/audio-v3.h | |||
| @@ -387,6 +387,12 @@ struct uac3_interrupt_data_msg { | |||
| 387 | #define UAC3_CONNECTORS 0x0f | 387 | #define UAC3_CONNECTORS 0x0f |
| 388 | #define UAC3_POWER_DOMAIN 0x10 | 388 | #define UAC3_POWER_DOMAIN 0x10 |
| 389 | 389 | ||
| 390 | /* A.20 PROCESSING UNIT PROCESS TYPES */ | ||
| 391 | #define UAC3_PROCESS_UNDEFINED 0x00 | ||
| 392 | #define UAC3_PROCESS_UP_DOWNMIX 0x01 | ||
| 393 | #define UAC3_PROCESS_STEREO_EXTENDER 0x02 | ||
| 394 | #define UAC3_PROCESS_MULTI_FUNCTION 0x03 | ||
| 395 | |||
| 390 | /* A.22 AUDIO CLASS-SPECIFIC REQUEST CODES */ | 396 | /* A.22 AUDIO CLASS-SPECIFIC REQUEST CODES */ |
| 391 | /* see audio-v2.h for the rest, which is identical to v2 */ | 397 | /* see audio-v2.h for the rest, which is identical to v2 */ |
| 392 | #define UAC3_CS_REQ_INTEN 0x04 | 398 | #define UAC3_CS_REQ_INTEN 0x04 |
| @@ -406,6 +412,15 @@ struct uac3_interrupt_data_msg { | |||
| 406 | #define UAC3_TE_OVERFLOW 0x04 | 412 | #define UAC3_TE_OVERFLOW 0x04 |
| 407 | #define UAC3_TE_LATENCY 0x05 | 413 | #define UAC3_TE_LATENCY 0x05 |
| 408 | 414 | ||
| 415 | /* A.23.10 PROCESSING UNITS CONTROL SELECTROS */ | ||
| 416 | |||
| 417 | /* Up/Down Mixer */ | ||
| 418 | #define UAC3_UD_MODE_SELECT 0x01 | ||
| 419 | |||
| 420 | /* Stereo Extender */ | ||
| 421 | #define UAC3_EXT_WIDTH_CONTROL 0x01 | ||
| 422 | |||
| 423 | |||
| 409 | /* BADD predefined Unit/Terminal values */ | 424 | /* BADD predefined Unit/Terminal values */ |
| 410 | #define UAC3_BADD_IT_ID1 1 /* Input Terminal ID1: bTerminalID = 1 */ | 425 | #define UAC3_BADD_IT_ID1 1 /* Input Terminal ID1: bTerminalID = 1 */ |
| 411 | #define UAC3_BADD_FU_ID2 2 /* Feature Unit ID2: bUnitID = 2 */ | 426 | #define UAC3_BADD_FU_ID2 2 /* Feature Unit ID2: bUnitID = 2 */ |
| @@ -432,4 +447,8 @@ struct uac3_interrupt_data_msg { | |||
| 432 | /* BADD sample rate is always fixed to 48kHz */ | 447 | /* BADD sample rate is always fixed to 48kHz */ |
| 433 | #define UAC3_BADD_SAMPLING_RATE 48000 | 448 | #define UAC3_BADD_SAMPLING_RATE 48000 |
| 434 | 449 | ||
| 450 | /* BADD power domains recovery times in 50us increments */ | ||
| 451 | #define UAC3_BADD_PD_RECOVER_D1D0 0x0258 /* 30ms */ | ||
| 452 | #define UAC3_BADD_PD_RECOVER_D2D0 0x1770 /* 300ms */ | ||
| 453 | |||
| 435 | #endif /* __LINUX_USB_AUDIO_V3_H */ | 454 | #endif /* __LINUX_USB_AUDIO_V3_H */ |
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h index 77f0f0af3a71..a34539b7f750 100644 --- a/include/linux/vga_switcheroo.h +++ b/include/linux/vga_switcheroo.h | |||
| @@ -84,8 +84,8 @@ enum vga_switcheroo_state { | |||
| 84 | * Client identifier. Audio clients use the same identifier & 0x100. | 84 | * Client identifier. Audio clients use the same identifier & 0x100. |
| 85 | */ | 85 | */ |
| 86 | enum vga_switcheroo_client_id { | 86 | enum vga_switcheroo_client_id { |
| 87 | VGA_SWITCHEROO_UNKNOWN_ID = -1, | 87 | VGA_SWITCHEROO_UNKNOWN_ID = 0x1000, |
| 88 | VGA_SWITCHEROO_IGD, | 88 | VGA_SWITCHEROO_IGD = 0, |
| 89 | VGA_SWITCHEROO_DIS, | 89 | VGA_SWITCHEROO_DIS, |
| 90 | VGA_SWITCHEROO_MAX_CLIENTS, | 90 | VGA_SWITCHEROO_MAX_CLIENTS, |
| 91 | }; | 91 | }; |
| @@ -151,7 +151,7 @@ int vga_switcheroo_register_client(struct pci_dev *dev, | |||
| 151 | bool driver_power_control); | 151 | bool driver_power_control); |
| 152 | int vga_switcheroo_register_audio_client(struct pci_dev *pdev, | 152 | int vga_switcheroo_register_audio_client(struct pci_dev *pdev, |
| 153 | const struct vga_switcheroo_client_ops *ops, | 153 | const struct vga_switcheroo_client_ops *ops, |
| 154 | enum vga_switcheroo_client_id id); | 154 | struct pci_dev *vga_dev); |
| 155 | 155 | ||
| 156 | void vga_switcheroo_client_fb_set(struct pci_dev *dev, | 156 | void vga_switcheroo_client_fb_set(struct pci_dev *dev, |
| 157 | struct fb_info *info); | 157 | struct fb_info *info); |
| @@ -180,7 +180,7 @@ static inline int vga_switcheroo_register_handler(const struct vga_switcheroo_ha | |||
| 180 | enum vga_switcheroo_handler_flags_t handler_flags) { return 0; } | 180 | enum vga_switcheroo_handler_flags_t handler_flags) { return 0; } |
| 181 | static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev, | 181 | static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev, |
| 182 | const struct vga_switcheroo_client_ops *ops, | 182 | const struct vga_switcheroo_client_ops *ops, |
| 183 | enum vga_switcheroo_client_id id) { return 0; } | 183 | struct pci_dev *vga_dev) { return 0; } |
| 184 | static inline void vga_switcheroo_unregister_handler(void) {} | 184 | static inline void vga_switcheroo_unregister_handler(void) {} |
| 185 | static inline enum vga_switcheroo_handler_flags_t vga_switcheroo_handler_flags(void) { return 0; } | 185 | static inline enum vga_switcheroo_handler_flags_t vga_switcheroo_handler_flags(void) { return 0; } |
| 186 | static inline int vga_switcheroo_lock_ddc(struct pci_dev *pdev) { return -ENODEV; } | 186 | static inline int vga_switcheroo_lock_ddc(struct pci_dev *pdev) { return -ENODEV; } |
