[alsa-devel] [PATCH 7/8] ALSA: pcm: Add card sync_irq field

Takashi Iwai tiwai at suse.de
Mon Nov 18 21:40:33 CET 2019


On Mon, 18 Nov 2019 20:55:19 +0100,
Sridharan, Ranjani wrote:
> 
>     > Thanks for the clarification, Takashi. But just wondering how would one
>     pass
>     > on the sync_irq when the snd_card is created? Typically in the case of
>     the
>     > Intel platforms, the card->dev points to the platform device for the
>     machine
>     > driver that registers the card and the PCI device is the parent of the
>     machine
>     > drv platform device. 
>    
>     It's completely up to the driver implementation :)
>     You can implement the own sync_stop ops if that's easier, too.
> 
> I think this would make sense in the case of the SOF driver and we'd probably
> need to just call synchronize_irq() in the sync_stop() operation. With this
> change, we can probably remove the workaround we have to address the issue we
> were facing during snd_pcm_period_elapsed(). 
> 
> I can give this a try. We might need to run some stress tests to make sure it
> doesn't break anything. 

If this helps for SOF, it'd be great.  I have converted only non-ASoC
drivers regarding the sync-stop stuff, so it won't conflict my
upcoming changes :)

FWIW, the rest diff (post topic/pcm-managed) looks like:

 .../gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c    |  1 -
 drivers/media/pci/cobalt/cobalt-alsa-pcm.c         |  8 -----
 drivers/media/pci/cx18/cx18-alsa-pcm.c             | 13 --------
 drivers/media/pci/cx23885/cx23885-alsa.c           |  1 -
 drivers/media/pci/cx25821/cx25821-alsa.c           |  1 -
 drivers/media/pci/cx88/cx88-alsa.c                 |  1 -
 drivers/media/pci/ivtv/ivtv-alsa-pcm.c             | 13 --------
 drivers/media/pci/saa7134/saa7134-alsa.c           |  1 -
 drivers/media/pci/solo6x10/solo6x10-g723.c         |  1 -
 drivers/media/pci/tw686x/tw686x-audio.c            |  1 -
 drivers/media/usb/cx231xx/cx231xx-audio.c          |  1 -
 drivers/media/usb/em28xx/em28xx-audio.c            |  1 -
 drivers/media/usb/go7007/snd-go7007.c              |  1 -
 drivers/media/usb/tm6000/tm6000-alsa.c             |  1 -
 drivers/media/usb/usbtv/usbtv-audio.c              |  1 -
 drivers/staging/most/sound/sound.c                 |  1 -
 .../vc04_services/bcm2835-audio/bcm2835-pcm.c      |  2 --
 drivers/usb/gadget/function/u_audio.c              |  1 -
 include/sound/pcm.h                                |  2 --
 sound/aoa/soundbus/i2sbus/pcm.c                    |  2 --
 sound/arm/aaci.c                                   |  2 --
 sound/arm/pxa2xx-ac97.c                            |  1 -
 sound/atmel/ac97c.c                                |  2 --
 sound/core/pcm_local.h                             |  2 ++
 sound/core/pcm_memory.c                            | 16 ++-------
 sound/drivers/aloop.c                              |  1 -
 sound/drivers/dummy.c                              |  2 --
 sound/drivers/ml403-ac97cr.c                       |  2 --
 sound/drivers/pcsp/pcsp_lib.c                      |  1 -
 sound/drivers/vx/vx_pcm.c                          |  2 --
 sound/firewire/bebob/bebob_pcm.c                   |  2 --
 sound/firewire/dice/dice-pcm.c                     |  2 --
 sound/firewire/digi00x/digi00x-pcm.c               |  2 --
 sound/firewire/fireface/ff-pcm.c                   |  2 --
 sound/firewire/fireworks/fireworks_pcm.c           |  2 --
 sound/firewire/isight.c                            |  1 -
 sound/firewire/motu/motu-pcm.c                     |  2 --
 sound/firewire/oxfw/oxfw-pcm.c                     |  2 --
 sound/firewire/tascam/tascam-pcm.c                 |  2 --
 sound/isa/ad1816a/ad1816a_lib.c                    |  3 +-
 sound/isa/es1688/es1688_lib.c                      |  9 +----
 sound/isa/es18xx.c                                 |  3 +-
 sound/isa/gus/gus_main.c                           |  1 +
 sound/isa/gus/gus_pcm.c                            |  2 --
 sound/isa/gus/gusmax.c                             |  3 +-
 sound/isa/gus/interwave.c                          |  1 +
 sound/isa/msnd/msnd.c                              |  2 --
 sound/isa/msnd/msnd_pinnacle.c                     |  1 +
 sound/isa/opl3sa2.c                                |  1 +
 sound/isa/opti9xx/opti92x-ad1848.c                 |  1 +
 sound/isa/sb/emu8000_pcm.c                         |  1 -
 sound/isa/sb/sb16_main.c                           |  2 --
 sound/isa/sb/sb8_main.c                            |  2 --
 sound/isa/sb/sb_common.c                           |  1 +
 sound/isa/wavefront/wavefront.c                    |  1 +
 sound/isa/wss/wss_lib.c                            |  3 +-
 sound/mips/hal2.c                                  |  2 --
 sound/mips/sgio2audio.c                            |  3 --
 sound/parisc/harmony.c                             |  2 --
 sound/pci/ad1889.c                                 |  4 +--
 sound/pci/ali5451/ali5451.c                        |  7 +---
 sound/pci/als300.c                                 |  4 +--
 sound/pci/als4000.c                                |  2 --
 sound/pci/asihpi/asihpi.c                          | 17 ----------
 sound/pci/atiixp.c                                 |  5 +--
 sound/pci/atiixp_modem.c                           |  4 +--
 sound/pci/au88x0/au88x0.c                          |  1 +
 sound/pci/au88x0/au88x0_pcm.c                      |  1 -
 sound/pci/aw2/aw2-alsa.c                           |  3 +-
 sound/pci/azt3328.c                                |  5 +--
 sound/pci/bt87x.c                                  |  3 +-
 sound/pci/ca0106/ca0106_main.c                     |  9 +----
 sound/pci/cmipci.c                                 |  6 +---
 sound/pci/cs4281.c                                 |  7 +---
 sound/pci/cs46xx/cs46xx_lib.c                      | 11 +-----
 sound/pci/cs5535audio/cs5535audio.c                |  2 +-
 sound/pci/cs5535audio/cs5535audio_pcm.c            |  2 --
 sound/pci/ctxfi/cthw20k1.c                         |  4 +--
 sound/pci/ctxfi/cthw20k2.c                         |  1 +
 sound/pci/ctxfi/ctpcm.c                            |  2 --
 sound/pci/echoaudio/echoaudio.c                    |  7 ++--
 sound/pci/emu10k1/emu10k1_main.c                   |  1 +
 sound/pci/emu10k1/emu10k1x.c                       |  3 +-
 sound/pci/emu10k1/emupcm.c                         |  6 ----
 sound/pci/emu10k1/p16v.c                           |  2 --
 sound/pci/ens1370.c                                |  7 +---
 sound/pci/es1938.c                                 |  5 +--
 sound/pci/es1968.c                                 |  4 ---
 sound/pci/fm801.c                                  |  3 +-
 sound/pci/hda/hda_controller.c                     |  1 -
 sound/pci/hda/hda_intel.c                          |  4 ++-
 sound/pci/hda/hda_tegra.c                          |  4 +--
 sound/pci/ice1712/ice1712.c                        |  7 +---
 sound/pci/ice1712/ice1724.c                        |  7 +---
 sound/pci/intel8x0.c                               | 16 ++-------
 sound/pci/intel8x0m.c                              |  5 +--
 sound/pci/korg1212/korg1212.c                      |  1 +
 sound/pci/lola/lola.c                              |  2 +-
 sound/pci/lola/lola_pcm.c                          |  1 -
 sound/pci/lx6464es/lx6464es.c                      |  3 +-
 sound/pci/maestro3.c                               |  3 +-
 sound/pci/mixart/mixart.c                          |  3 +-
 sound/pci/nm256/nm256.c                            |  4 +--
 sound/pci/oxygen/oxygen_lib.c                      |  2 +-
 sound/pci/oxygen/oxygen_pcm.c                      |  6 ----
 sound/pci/pcxhr/pcxhr.c                            |  2 +-
 sound/pci/riptide/riptide.c                        |  3 +-
 sound/pci/rme32.c                                  |  9 +----
 sound/pci/rme96.c                                  |  5 +--
 sound/pci/rme9652/hdsp.c                           |  1 +
 sound/pci/rme9652/hdspm.c                          |  1 +
 sound/pci/rme9652/rme9652.c                        |  1 +
 sound/pci/sis7019.c                                |  3 +-
 sound/pci/sonicvibes.c                             |  3 +-
 sound/pci/trident/trident_main.c                   | 32 +-----------------
 sound/pci/via82xx.c                                |  8 +----
 sound/pci/via82xx_modem.c                          |  5 +--
 sound/pci/vx222/vx222.c                            |  1 +
 sound/pci/ymfpci/ymfpci_main.c                     |  6 +---
 sound/pcmcia/pdaudiocf/pdaudiocf.c                 |  1 +
 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c             |  1 -
 sound/pcmcia/vx/vxpocket.c                         |  1 +
 sound/ppc/pmac.c                                   |  2 --
 sound/ppc/snd_ps3.c                                |  1 -
 sound/sh/aica.c                                    |  1 -
 sound/sh/sh_dac_audio.c                            |  1 -
 sound/sparc/amd7930.c                              |  2 --
 sound/sparc/cs4231.c                               |  2 --
 sound/sparc/dbri.c                                 |  1 -
 sound/spi/at73c213.c                               |  1 -
 sound/usb/6fire/pcm.c                              |  1 -
 sound/usb/caiaq/audio.c                            |  1 -
 sound/usb/hiface/pcm.c                             |  1 -
 sound/usb/line6/capture.c                          |  1 -
 sound/usb/line6/playback.c                         |  1 -
 sound/usb/misc/ua101.c                             |  2 --
 sound/usb/pcm.c                                    | 39 ++++++++++++++--------
 sound/usb/usx2y/usbusx2yaudio.c                    |  1 -
 sound/usb/usx2y/usx2yhwdeppcm.c                    |  1 -
 sound/x86/intel_hdmi_audio.c                       |  1 -
 sound/xen/xen_snd_front_alsa.c                     |  2 --
 141 files changed, 104 insertions(+), 394 deletions(-)


Takashi


More information about the Alsa-devel mailing list