summaryrefslogtreecommitdiffstats
path: root/sound/pci (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: update dell-wmi mic-mute registration to new world orderLinus Torvalds2018-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Commit c647f806b8c2 ("ALSA: hda - Allow multiple ADCs for mic mute LED controls") changed the return value of the snd_hda_gen_add_micmute_led() without actually updating the callers. Admittedly, almost no callers actually cared about the return value. But one call site very much did: the Dell wmi code. It would see the registration return zero, which _used_ to mean "failed" but now means "success", and clear the dell_micmute_led_set_func pointer. End result: the successful registration would end up calling the Dell code that thought it had all failed, and call through a NULL pointer. To make matters worse, it ends up being a tail-call, and with the retpoline sequence you don't even see the caller (dell_micmute_update()) in the stack trace, so the error ended up way less obvious than it should have been. Fixes: c647f806b8c2 "ALSA: hda - Allow multiple ADCs for mic mute LED controls" Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-next' into for-linusTakashi Iwai2018-08-1259-1258/+1344
|\ | | | | | | | | | | Preparation for 4.19 merge material. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: mixart: Mark expected switch fall-throughGustavo A. R. Silva2018-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case, I replaced the code comment with a proper "fall through" annotation, which is what GCC is expecting to find. Addresses-Coverity-ID: 114889 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add exit commands for Recon3DConnor McAdams2018-08-081-14/+16
| | | | | | | | | | | | | | | | This patch adds exit functions for the Recon3D, and cleans up the current exit function. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Change mixer controls for Recon3DConnor McAdams2018-08-081-7/+11
| | | | | | | | | | | | | | This patch adds changes to setup the Recon3D's mixer controls. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add Recon3D input and output select commandsConnor McAdams2018-08-081-0/+15
| | | | | | | | | | | | | | | | This patch adds commands to the alternative input and output select commands to support the Recon3D. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add DSP setup defaults for Recon3DConnor McAdams2018-08-081-10/+11
| | | | | | | | | | | | | | | | | | | | The Recon3D can use many of the same functions as the Recon3Di, so many of the r3di prefix function remain the same, but change their names to the more generic r3d prefix. This patch does this, and adds quirk checks for things specific to the Recon3Di. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add Recon3D startup functions and setupConnor McAdams2018-08-081-13/+36
| | | | | | | | | | | | | | | | | | This patch adds functions for Recon3D startup, and sets values for things such as use_pci_mmio. It also renames some functions and tables from the sbz prefix into ca0132, as the Recon3D uses them as well. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add bool variable to enable/disable pci region2 mmioConnor McAdams2018-08-081-13/+19
| | | | | | | | | | | | | | | | | | This patch adds the ability to choose whether or not to map the pci region2, which is used for things such as GPIO on the Recon3D and Sound Blaster Z. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add Recon3D pincfgConnor McAdams2018-08-081-2/+24
| | | | | | | | | | | | | | | | This patch adds pin configs from the Recon3D, taken from the Window's driver. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add quirk ID and enum for Recon3DConnor McAdams2018-08-081-0/+2
| | | | | | | | | | | | | | | | This patch adds the PCI subsys ID for the Recon3D that has been tested, and adds the QUIRK_R3D enumeration. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Add alt_functions unsolicited responseConnor McAdams2018-08-081-1/+6
| | | | | | | | | | | | | | | | This patch fixes a previous oversight where the microphone unsolicited response would use the wrong input selection function. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Clean up ca0132_init function.Connor McAdams2018-08-081-13/+3
| | | | | | | | | | | | | | | | This patch cleans up ca0132_init by removing unnecessary commands and ordering things better. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Create mmio gpio function to make code clearerConnor McAdams2018-08-081-24/+38
| | | | | | | | | | | | | | | | This patch adds a new function, ca0132_mmio_gpio_set, to clear up what is going on with writes to mmio region 0x320. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: echoaudio: Mark expected switch fall-throughsGustavo A. R. Silva2018-08-061-0/+2
| | | | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115156 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: emu10k1: Mark expected switch fall-throughsGustavo A. R. Silva2018-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case, I replaced the code comment with a proper "fall through" annotation, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: mixart: Mark expected switch fall-throughGustavo A. R. Silva2018-08-061-0/+1
| | | | | | | | | | | | | | | | In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Add mute LED quirk for HP Spectre x360Alexandru Gagniuc2018-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | This device has the same issues as the HP x360 wrt the MUTE LED and the front speakers not working. This patch fixes the MUTE LED issue, but doesn't touch the HDA verbs. The fix for the x360 does not work on the Spectre. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: pci: Remove empty init and exitTakashi Iwai2018-08-032-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | For a sake of code simplification, remove the init and the exit entries that do nothing. Notes for readers: actually it's OK to remove *both* init and exit, but not OK to remove the exit entry. By removing only the exit while keeping init, the module becomes permanently loaded; i.e. you cannot unload it any longer! Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: sonicvibes: remove redundant pointer 'dir'Colin Ian King2018-08-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | Pointer 'dir' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'dir' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: ens137x: remove redundant array pcm_devsColin Ian King2018-08-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | The array pcm_devs is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'pcm_devs' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: emu10k1: remove redundant variable attnColin Ian King2018-08-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | Variable attn is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'attn' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: cs5535audio: remove redundant pointer 'dma'Colin Ian King2018-08-011-6/+1
| | | | | | | | | | | | | | | | | | | | | | Pointer 'dma' is being assigned but is never used hence it is redundant and can be removed. Cleans up two clang warnings: warning: variable 'dma' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi: remove redundant variable max_streamsColin Ian King2018-08-011-5/+0
| | | | | | | | | | | | | | | | | | | | | | Variable max_streams is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'max_streams' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge branch 'for-linus' into topic/virmidiTakashi Iwai2018-07-295-10/+13
| |\ | | | | | | | | | | | | | | | | | | Pull the latest ALSA sequencer fixes for the further development of virmidi. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda/hdmi: Use single mutex unlock in error pathsTakashi Iwai2018-07-291-34/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of calling mutex_unlock() at each error path multiple times, take the standard goto-and-a-single-unlock approach. This will simplify the code and make easier to find the unbalanced mutex locks. No functional changes, but only the code readability improvement as a preliminary work for further changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ctxfi: cthw20k2: Replace mdelay() with msleep() and usleep_range()Jia-Ju Bai2018-07-271-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hw_pll_init(), hw_dac_stop(), hw_dac_start() and hw_adc_init() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA:: ctxfi: cthw20k1: Replace mdelay() with msleep()Jia-Ju Bai2018-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hw_pll_init(), hw_reset_dac() and hw_card_init() are never called in atomic context. They calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: atiixp_modem: Proper endian notationsTakashi Iwai2018-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DMA address table in atiixp modem driver is in little-endian, hence we should define it with __le32 properly. Spotted by sparse, a warning like: sound/pci/atiixp_modem.c:360:28: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: atiixp: Proper endian notationsTakashi Iwai2018-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The DMA address table in atiixp driver is in little-endian, hence we should define it with __le32 properly. Spotted by sparse, a warning like: sound/pci/atiixp.c:393:28: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: bt87x: Proper endian notationsTakashi Iwai2018-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RISC data in bt87x is in little-endian, hence we should define it with __le32 properly. Spotted by sparse, a warning like: sound/pci/bt87x.c:240:17: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: echoaudio: Proper endian notationsTakashi Iwai2018-07-275-38/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many data fields defined in echoaudio drivers are in little-endian, hence they should be defined with __le16 or __le32. This makes it easier to catch the forgotten conversions. Spotted by sparse, a warning like: sound/pci/echoaudio/echoaudio_dsp.c:990:36: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: maestro3: Proper endian notationsTakashi Iwai2018-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ASSP data passed to maestro3 driver is in little-endian format, hence the data pointer should be with __le16. Spotted by sparse, warnings like: sound/pci/maestro3.c:2128:35: warning: cast to restricted __le16 Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: intel8x0m: Proper endian notationsTakashi Iwai2018-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BD address tables in intel8x0m driver are in little-endian, hence they should be represented as __le32 instead u32. Spotted by sparse, warnings like: sound/pci/intel8x0m.c:406:40: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: intel8x0: Proper endian notationsTakashi Iwai2018-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BD address tables in intel8x0 driver are in little-endian, hence they should be represented as __le32 instead u32. Spotted by sparse, warnings like: sound/pci/intel8x0.c:688:40: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: lola: Proper endian notationsTakashi Iwai2018-07-273-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BDL entries in lola driver are little-endian while we code them as u32. This leads to sparse warnings like: sound/pci/lola/lola.c:105:40: warning: incorrect type in assignment (different base types) sound/pci/lola/lola.c:105:40: expected unsigned int [unsigned] [usertype] <noident> sound/pci/lola/lola.c:105:40: got restricted __le32 [usertype] <noident> This patch fixes the declarations to the proper __le32 type. Also, there was a typo in the original code, where __user was used that was intended as __iomem. This was caused also by sparse: sound/pci/lola/lola_mixer.c:132:27: warning: incorrect type in assignment (different address spaces) Fixed in this patch as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: mixart: Proper endian notationsTakashi Iwai2018-07-273-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The miXart driver deals with big-endian values as raw data, while it declares most of variables as u32. This leads to sparse warnings like sound/pci/mixart/mixart.c:1203:23: warning: cast to restricted __be32 Fix them by properly defining the structs and add the explicit cast to macros. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: riptide: Properly endian notationsTakashi Iwai2018-07-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The SG descriptor of Riptide contains the little-endian values, hence we need to define with __le32 properly. This fixes sparse warnings like: sound/pci/riptide/riptide.c:1112:40: warning: cast to restricted __le32 Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: trident: Proper endian notationsTakashi Iwai2018-07-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TLB entries in Trident driver are represented in little-endian, hence they should be declared as __le32. This patch fixes the sparse warnings like: sound/pci/trident/trident_memory.c:226:17: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ymfpci: Proper endian notationsTakashi Iwai2018-07-272-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | The bank values are all little-endians, so they should be defined with __le32. This fixes lots of sparse warnings like: sound/pci/ymfpci/ymfpci_main.c:315:23: warning: cast to restricted __le32 sound/pci/ymfpci/ymfpci_main.c:342:32: warning: incorrect type in assignment (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: asihpi: Fix PCM format notationsTakashi Iwai2018-07-271-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | asihpi driver treats -1 as an own invalid PCM format, but this needs a proper cast with __force prefix since PCM format type is __bitwise. Define a constant with the proper type and use it allover. This fixes sparse warnings like: sound/pci/asihpi/asihpi.c:315:9: warning: incorrect type in initializer (different base types) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: au88x0: Fix sparse warning wrt PCM format typeTakashi Iwai2018-07-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCM format type is with __bitwise, and it can't be converted from integer implicitly. Instead of an ugly cast, declare the function argument of vortex_alsafmt_aspfmt() with the proper snd_pcm_format_t type. This fixes the sparse warning like: sound/pci/au88x0/au88x0_core.c:2778:14: warning: restricted snd_pcm_format_t degrades to integer Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: riptide: Fix PCM format type conversionTakashi Iwai2018-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCM format type is with __bitwise, hence it needs to be explicitly declared as snd_pcm_format_t, as warned by sparse: sound/pci/riptide/riptide.c:1028:34: warning: incorrect type in argument 1 (different base types) sound/pci/riptide/riptide.c:1028:34: expected restricted snd_pcm_format_t [usertype] format sound/pci/riptide/riptide.c:1028:34: got unsigned char [unsigned] format Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: trident: Suppress gcc string warningTakashi Iwai2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The meddlesome gcc warns about the possible shortname string in trident driver code: sound/pci/trident/trident.c: In function ‘snd_trident_probe’: sound/pci/trident/trident.c:126:2: warning: ‘strcat’ accessing 17 or more bytes at offsets 36 and 20 may overlap 1 byte at offset 36 [-Wrestrict] strcat(card->shortname, card->driver); It happens since gcc calculates the possible string size from card->driver, but this can't be true since we did set the string just before that, and they are much shorter. For shutting it up, use the exactly same string set to card->driver for strcat() to card->shortname, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: emu10k1: Fix missing __force annotation for user/kernel pointer castTakashi Iwai2018-07-261-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cast between user-space and kernel-space needs an explicit __force prefix, but it's missing in many places in emu10k1 driver code. Spotted by sparse as a warning like: sound/pci/emu10k1/emufx.c:529:33: warning: cast removes address space of expression Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: korg1212: Add __force annotation to cast in user-copy callbacksTakashi Iwai2018-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The user-copy callbacks in korg1212 driver contain the explicit cast from a user pointer to a kernel pointer, but they missed __force prefix. It's mandatory for converting between them. Spotted by sparse, a warning like: sound/pci/korg1212/korg1212.c:1329:33: warning: cast removes address space of expression Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Fix a sparse warning about snd_ctl_elem_iface_tTakashi Iwai2018-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The knew->iface field is in snd_ctl_elem_iface_t, which is with __bitwise, hence it can't be converted implicitly from integer. Give an explicit cast for the invalid type. Spotted by sparse: sound/pci/hda/hda_codec.c:3280:25: warning: restricted snd_ctl_elem_iface_t degrades to integer Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda/ca0132 - Use NULL instead of 0Takashi Iwai2018-07-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use NULL for initializing the snd_kcontrol_new.tlv field, instead of 0, as warned by sparse: sound/pci/hda/patch_ca0132.c:5519:22: warning: Using plain integer as NULL pointer Also, the driver does the same initialization twice, once for knew.tlv.c and another for knew.tlv.p while both point to the same address (these are union). Drop the latter superfluous one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | Merge branch 'topic/drm_audio_component' into for-nextTakashi Iwai2018-07-191-16/+41
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Pull the generic drm_audio_component support, which will be used later for AMD/ATI and other HD-audio HDMI codec drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | ALSA: hda: Make audio component support more genericTakashi Iwai2018-07-171-13/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the final step for more generic support of DRM audio component. The generic audio component code is now moved to its own file, and the symbols are renamed from snd_hac_i915_* to snd_hdac_acomp_*, respectively. The generic code is enabled via the new kconfig, CONFIG_SND_HDA_COMPONENT, while CONFIG_SND_HDA_I915 is kept as the super-class. Along with the split, three new callbacks are added to audio_ops: pin2port is for providing the conversion between the pin number and the widget id, and master_bind/master_unbin are called at binding / unbinding the master component, respectively. All these are optional, but used in i915 implementation and also other later implementations. A note about the new snd_hdac_acomp_init() function: there is a slight difference between this and the old snd_hdac_i915_init(). The latter (still) synchronizes with the master component binding, i.e. it assures that the relevant DRM component gets bound when it returns, or gives a negative error. Meanwhile the new function doesn't synchronize but just leaves as is. It's the responsibility by the caller's side to synchronize, or the caller may accept the asynchronous binding on the fly. v1->v2: Fix missing NULL check in master_bind/unbind Signed-off-by: Takashi Iwai <tiwai@suse.de>