alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Add rate limitation in a SectionDevice
       [not found] <1671441527085860968-webhooks-bot@alsa-project.org>
@ 2022-12-19  9:18 ` GitHub issues - edited
  0 siblings, 0 replies; 2+ messages in thread
From: GitHub issues - edited @ 2022-12-19  9:18 UTC (permalink / raw)
  To: alsa-devel

alsa-project/alsa-ucm-conf issue #253 was edited from fchiby:

Hello  @perexg,

I created an alsa-ucm configuration to my board i350-evk (mt8365-evk). 
Here my configuration files:

[mt8365-evk.conf.txt](https://github.com/alsa-project/alsa-ucm-conf/files/10247428/mt8365-evk.conf.txt)
[HiFi.conf.txt](https://github.com/alsa-project/alsa-ucm-conf/files/10247429/HiFi.conf.txt)

However pulseaudio initialization failed because of hw:mt8365evk,2, this pcm device is connected to jack_mic and Amic.  

```
D: [pulseaudio] alsa-util.c: _buffer_size:4408 ,   _period_size:1102
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
D: [pulseaudio] alsa-util.c: _buffer_size:4408 ,   _period_size:1102
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
D: [pulseaudio] alsa-util.c: _buffer_size:4408 ,   _period_size:1102
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
D: [pulseaudio] alsa-util.c: Set neither period nor buffer size.
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Invalid argument
D: [pulseaudio] alsa-util.c: Trying plug:SLAVE='_ucm0006.hw:mt8365evk,2' with SND_PCM_NO_AUTO_FORMAT ...
I: [pulseaudio] pcm.c: Unknown PCM _ucm0006.hw:mt8365evk,2
I: [pulseaudio] alsa-util.c: Error opening PCM device plug:SLAVE='_ucm0006.hw:mt8365evk,2': No such file or directory
D: [pulseaudio] alsa-mixer.c: Profile set 0xaaab0a13a700, auto_profiles=no, probed=yes, n_mappings=0, n_profiles=0, n_decibel_fixes=0
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-sound" card_name="alsa_card.platform-sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
```

Whith dmesg I got more details about pulseaudio failure: 

```
[  160.295717] mt8365-afe-pcm 11220000.audio-controller: mt8365_afe_fe_hw_params AWB period = 1102 rate = 44100 channels = 1
[  160.295865] mt8365-afe-pcm 11220000.audio-controller: mt8365_afe_int_adda_prepare 'Capture' rate = 44100
[  160.295881] mt8365-afe-pcm 11220000.audio-controller: ASoC: error at snd_soc_pcm_dai_prepare on INT ADDA: -22
[  160.295891]  MTK Codec: ASoC: soc_pcm_prepare() failed (-22)
[  160.295900]  AWB_FE: ASoC: dpcm_be_dai_prepare() failed (-22)
[  160.295908]  AWB_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[  160.296395] mt8365-afe-pcm 11220000.audio-controller: mt8365_afe_fe_hw_params AWB period = 512 rate = 44100 channels = 1
[  160.296543] mt8365-afe-pcm 11220000.audio-controller: mt8365_afe_int_adda_prepare 'Capture' rate = 44100
[  160.296559] mt8365-afe-pcm 11220000.audio-controller: ASoC: error at snd_soc_pcm_dai_prepare on INT ADDA: -22
[  160.296569]  MTK Codec: ASoC: soc_pcm_prepare() failed (-22)
[  160.296577]  AWB_FE: ASoC: dpcm_be_dai_prepare() failed (-22)
[  160.296585]  AWB_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
```
 When I checked the machine driver, hw:mt8365evk,2 FE (AWB) has 8000_192000,  while hw:mt8365evk,2  BE (INT_ADDA) has only [8000, 16000, 32000, 48000] as sample rates.
Actually, the rate limitation is not on afe dai, it's on PMIC. So we prefer to not restrict hw:mt8365evk,2 FE AWB rates.  

My question is, **is it possible to specify the rate limitation in a** `SectionDevice` ?  I checked the alsa-ucm-conf documentation  and did not find any section for this :/ [alsa-ucm-conf docs](https://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm__conf.htmll)

Thanks a bunch !

Issue URL     : https://github.com/alsa-project/alsa-ucm-conf/issues/253
Repository URL: https://github.com/alsa-project/alsa-ucm-conf

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Add rate limitation in a SectionDevice
       [not found] <1671440576363270998-webhooks-bot@alsa-project.org>
@ 2022-12-19  9:03 ` GitHub issues - opened
  0 siblings, 0 replies; 2+ messages in thread
From: GitHub issues - opened @ 2022-12-19  9:03 UTC (permalink / raw)
  To: alsa-devel

alsa-project/alsa-ucm-conf issue #253 was opened from fchiby:

Hello, 

I created an alsa-ucm configuration to my board i350-evk (mt8365-evk). 
Here my configuration files:

[mt8365-evk.conf.txt](https://github.com/alsa-project/alsa-ucm-conf/files/10247428/mt8365-evk.conf.txt)
[HiFi.conf.txt](https://github.com/alsa-project/alsa-ucm-conf/files/10247429/HiFi.conf.txt)

However pulseaudio initialization failed because of hw:mt8365evk,2, this pcm device is connected to jack_mic and Amic.  

```
D: [pulseaudio] alsa-util.c: _buffer_size:4408 ,   _period_size:1102
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
D: [pulseaudio] alsa-util.c: _buffer_size:4408 ,   _period_size:1102
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
D: [pulseaudio] alsa-util.c: _buffer_size:4408 ,   _period_size:1102
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
D: [pulseaudio] alsa-util.c: Set neither period nor buffer size.
I: [pulseaudio] pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Invalid argument
D: [pulseaudio] alsa-util.c: Trying plug:SLAVE='_ucm0006.hw:mt8365evk,2' with SND_PCM_NO_AUTO_FORMAT ...
I: [pulseaudio] pcm.c: Unknown PCM _ucm0006.hw:mt8365evk,2
I: [pulseaudio] alsa-util.c: Error opening PCM device plug:SLAVE='_ucm0006.hw:mt8365evk,2': No such file or directory
D: [pulseaudio] alsa-mixer.c: Profile set 0xaaab0a13a700, auto_profiles=no, probed=yes, n_mappings=0, n_profiles=0, n_decibel_fixes=0
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-sound" card_name="alsa_card.platform-sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
```

Whith dmesg I got more details about pulseaudio failure: 

```
[  160.295717] mt8365-afe-pcm 11220000.audio-controller: mt8365_afe_fe_hw_params AWB period = 1102 rate = 44100 channels = 1
[  160.295865] mt8365-afe-pcm 11220000.audio-controller: mt8365_afe_int_adda_prepare 'Capture' rate = 44100
[  160.295881] mt8365-afe-pcm 11220000.audio-controller: ASoC: error at snd_soc_pcm_dai_prepare on INT ADDA: -22
[  160.295891]  MTK Codec: ASoC: soc_pcm_prepare() failed (-22)
[  160.295900]  AWB_FE: ASoC: dpcm_be_dai_prepare() failed (-22)
[  160.295908]  AWB_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
[  160.296395] mt8365-afe-pcm 11220000.audio-controller: mt8365_afe_fe_hw_params AWB period = 512 rate = 44100 channels = 1
[  160.296543] mt8365-afe-pcm 11220000.audio-controller: mt8365_afe_int_adda_prepare 'Capture' rate = 44100
[  160.296559] mt8365-afe-pcm 11220000.audio-controller: ASoC: error at snd_soc_pcm_dai_prepare on INT ADDA: -22
[  160.296569]  MTK Codec: ASoC: soc_pcm_prepare() failed (-22)
[  160.296577]  AWB_FE: ASoC: dpcm_be_dai_prepare() failed (-22)
[  160.296585]  AWB_FE: ASoC: dpcm_fe_dai_prepare() failed (-22)
```
 When I checked the machine driver, hw:mt8365evk,2 FE (AWB) has 8000_192000,  while hw:mt8365evk,2  BE (INT_ADDA) has only [8000, 16000, 32000, 48000] as sample rates.
Actually, the rate limitation is not on afe dai, it's on PMIC. So we prefer to not restrict hw:mt8365evk,2 FE AWB rates.  

My question is, **is it possible to specify the rate limitation in a** `SectionDevice` ?  I checked the alsa-ucm-conf documentation  and did not find any section for this :/ [alsa-ucm-conf docs](https://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm__conf.htmll)

Thanks a bunch !

Issue URL     : https://github.com/alsa-project/alsa-ucm-conf/issues/253
Repository URL: https://github.com/alsa-project/alsa-ucm-conf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-19  9:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1671441527085860968-webhooks-bot@alsa-project.org>
2022-12-19  9:18 ` Add rate limitation in a SectionDevice GitHub issues - edited
     [not found] <1671440576363270998-webhooks-bot@alsa-project.org>
2022-12-19  9:03 ` GitHub issues - opened

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).