alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 3/3] ALSA: hda: Revert "ALSA: hda: Allow setting preallocation again for x86"
Date: Thu, 18 Mar 2021 16:44:33 +0100	[thread overview]
Message-ID: <c70b8f56-c6c3-cde1-40bf-f04765da56d7@linux.intel.com> (raw)
In-Reply-To: <s5hk0q4h3yz.wl-tiwai@suse.de>

On 3/18/2021 4:32 PM, Takashi Iwai wrote:
> On Thu, 18 Mar 2021 16:11:22 +0100,
> Amadeusz Sławiński wrote:
>>
>> This reverts commit f8e4ae10de43fbb7ce85f79e04eca2988b6b2c40.
> 
> It should be a format of commit ("description ...") as checkpatch.pl
> would complain.  The commit f8e4ae10de43 itself is a revert of commit
> c31427d0d21e, and you need to give an explanation why the
> revert-of-a-revert can work better at this time.
> 

I don't mind improving it, however it seems like there is exception done 
in checkpatch for "This reverts commit", so there is no warning on this 
line.

Will add explanation.

> 
> thanks,
> 
> Takashi
> 
>> On systems where there is a lot of FrontEnds, when
>> CONFIG_SND_HDA_PREALLOC_SIZE != 0  ALSA core allocates memory for each
>> FE, which may cause out of memory problems due to per card limit. Force
>> config to 0 on X86, so memory will be allocated on as needed basis.
>>
>> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=201251#c322
>> Suggested-by: Takashi Iwai <tiwai@suse.de>
>> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
>> ---
>>   sound/hda/Kconfig | 7 +++----
>>   1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/sound/hda/Kconfig b/sound/hda/Kconfig
>> index 57595f1552c9..741179ccbd4e 100644
>> --- a/sound/hda/Kconfig
>> +++ b/sound/hda/Kconfig
>> @@ -21,17 +21,16 @@ config SND_HDA_EXT_CORE
>>          select SND_HDA_CORE
>>   
>>   config SND_HDA_PREALLOC_SIZE
>> -	int "Pre-allocated buffer size for HD-audio driver"
>> +	int "Pre-allocated buffer size for HD-audio driver" if !SND_DMA_SGBUF
>>   	range 0 32768
>> -	default 2048 if SND_DMA_SGBUF
>> +	default 0 if SND_DMA_SGBUF
>>   	default 64 if !SND_DMA_SGBUF
>>   	help
>>   	  Specifies the default pre-allocated buffer-size in kB for the
>>   	  HD-audio driver.  A larger buffer (e.g. 2048) is preferred
>>   	  for systems using PulseAudio.  The default 64 is chosen just
>>   	  for compatibility reasons.
>> -	  On x86 systems, the default is 2048 as a reasonable value for
>> -	  most of modern systems.
>> +	  On x86 systems, the default is zero as we need no preallocation.
>>   
>>   	  Note that the pre-allocation size can be changed dynamically
>>   	  via a proc file (/proc/asound/card*/pcm*/sub*/prealloc), too.
>> -- 
>> 2.25.1
>>


  reply	other threads:[~2021-03-18 15:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 15:11 [PATCH 0/3] Fix SND_HDA_PREALLOC issue Amadeusz Sławiński
2021-03-18 15:11 ` [PATCH 1/3] ALSA: pcm: Add debug print on memory allocation failure Amadeusz Sławiński
2021-03-18 15:11 ` [PATCH 2/3] ALSA: hda: Change AZX_MAX_BUF_SIZE from 1GB to 4MB Amadeusz Sławiński
2021-03-18 15:25   ` Takashi Iwai
2021-03-18 15:11 ` [PATCH 3/3] ALSA: hda: Revert "ALSA: hda: Allow setting preallocation again for x86" Amadeusz Sławiński
2021-03-18 15:32   ` Takashi Iwai
2021-03-18 15:44     ` Amadeusz Sławiński [this message]
2021-03-18 15:26 ` [PATCH 0/3] Fix SND_HDA_PREALLOC issue Cezary Rojewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c70b8f56-c6c3-cde1-40bf-f04765da56d7@linux.intel.com \
    --to=amadeuszx.slawinski@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=cezary.rojewski@intel.com \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).