Hi Marcin/Wojtek,
Could you run "dmesg" and share the output? As well as the output of "aplay -l" and "lsmod"?
Maybe there is something wrong when SOF opens the PCM. It seems driver will always enable PAUSE if sof_pcm_open() succeeds by setting SNDRV_PCM_INFO_PAUSE.
Please see https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/sof/pcm.... static int sof_pcm_open(struct snd_pcm_substream *substream) { ... /* set runtime config */ runtime->hw.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_NO_PERIOD_WAKEUP; ... }
Thanks Mengdong
-----Original Message----- From: Maka, Marcin Sent: Tuesday, October 9, 2018 6:45 PM To: Jie, Yang yang.jie@intel.com; Lin, Mengdong mengdong.lin@intel.com; OTC Linux Audio otc.linux.audio@intel.com; Wittbrodt, WojciechX wojciechx.wittbrodt@intel.com Cc: sound-open-firmware@alsa-project.org Subject: RE: Any SOF pcm hw parameters change that can disable PAUSE on GLK?
I am using SOF stack built by Wojtek and installed on Yorp.
-----Original Message----- From: Jie, Yang Sent: Tuesday, October 9, 2018 11:45 AM To: Lin, Mengdong mengdong.lin@intel.com; OTC Linux Audio otc.linux.audio@intel.com; Maka, Marcin marcin.maka@intel.com Cc: sound-open-firmware@alsa-project.org Subject: RE: Any SOF pcm hw parameters change that can disable PAUSE
on GLK?
I bet you are not using SOF driver, Marcin?
We need to configure pcm info with SNDRV_PCM_INFO_PAUSE if you
want
your PCM supporting that, please refer to sof/pcm.c:404 for that.
Thanks, ~Keyon
-----Original Message----- From: Lin, Mengdong Sent: Tuesday, October 9, 2018 5:27 PM To: OTC Linux Audio otc.linux.audio@intel.com; Maka, Marcin marcin.maka@intel.com Cc: sound-open-firmware@alsa-project.org Subject: Any SOF pcm hw parameters change that can disable PAUSE on
GLK?
Could someone share some insight here?
This is an issue observed by Marcin on GNL platform. When he runs 'aplay Ring09.wav -vv -I' and press SPACE to pause/resume, aplay will complain: PAUSE command ignored (no hw support)
aplay.c will call snd_pcm_hw_params_can_pause() and decide whethter HW supports pause. It seems hw parameter indicates that PAUSE cannot be supported.
Here is snd_pcm_hw_params_can_pause defined in alsa-lib pcm.c /** 3487 * \brief Check if hardware supports pause 3488 * \param params Configuration space 3489 * \retval 0 Hardware doesn't support pause 3490 * \retval 1 Hardware supports pause 3491 * 3492 * This function should only be called when the configuration space 3493 * contains a single configuration. Call #snd_pcm_hw_params to choose 3494 * a single configuration from the configuration space. 3495 */ 3496 int snd_pcm_hw_params_can_pause(const
snd_pcm_hw_params_t
*params) 3497 { 3498 assert(params); 3499 if (CHECK_SANITY(params->info == ~0U)) { 3500 SNDMSG("invalid PCM info field"); 3501 return 0; /* FIXME: should be a negative error? */ 3502 } 3503 return !!(params->info & SNDRV_PCM_INFO_PAUSE); 3504 }
Thanks Mengdong