Re: [PATCH] ALSA: emu10k1: minor optimizations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 21 Apr 2023 19:26:23 +0200,
Oswald Buddenhagen wrote:
> @@ -1245,12 +1245,10 @@ static int _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu)
>  	icode->code = icode->tram_addr_map + 256;
>  
>  	/* clear free GPRs */
> -	for (i = 0; i < 512; i++)
> -		set_bit(i, icode->gpr_valid);
> +	memset(icode->gpr_valid, 0xff, sizeof(icode->gpr_valid));
>  		
>  	/* clear TRAM data & address lines */
> -	for (i = 0; i < 256; i++)
> -		set_bit(i, icode->tram_valid);
> +	memset(icode->tram_valid, 0xff, sizeof(icode->tram_valid));

While those are OK...

>  	strcpy(icode->name, "Audigy DSP code for ALSA");
>  	ptr = 0;
> @@ -1886,12 +1884,10 @@ static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu)
>  	icode->code = icode->tram_addr_map + 160;
>  	
>  	/* clear free GPRs */
> -	for (i = 0; i < 256; i++)
> -		set_bit(i, icode->gpr_valid);
> +	memset(icode->gpr_valid, 0xff, sizeof(icode->gpr_valid));
>  
>  	/* clear TRAM data & address lines */
> -	for (i = 0; i < 160; i++)
> -		set_bit(i, icode->tram_valid);
> +	memset(icode->tram_valid, 0xff, sizeof(icode->tram_valid));

... those bitmap sizes don't match with the previous numbers, so this
is a behavior change.


thanks,

Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux