Case $1$: $a=0$
Then $2f(x)=f(0)$
$f(x)=0$
Case $2$: $a=1$
Then $2f(x)=f(x)$
$f(x)=0$
Case $3$: $a>0$ and $a\neq1$
Then $f(ax)=2f(x)$
$f(aa^x)=2f(a^x)$
$f(a^{x+1})=2f(a^x)$
$f(a^x)=\Theta(x)2^x$, where $\Theta(x)$ is an arbitrary periodic function with unit period
$f(x)=\Theta(\log_ax)x^{\log_a2}$, where $\Theta(x)$ is an arbitrary periodic function with unit period
Case $4$: $a=-1$
Then $2f(x)=f(-x)$
Let $f(x)=2^{g(x)}$ ,
Then $2^{g(x)+1}=2^{g(-x)}$
$g(x)+1=g(-x)$
$g(-x)-g(x)=1$
Case $5$: $a<0$ and $a\neq-1$
Then $f(ax)=2f(x)$
$f(a^2x)=2f(ax)=4f(x)$
$f((-a)^2x)=4f(x)$
$f((-a)^2(-a)^x)=4f((-a)^x)$
$f((-a)^{x+2})=4f((-a)^x)$
$f((-a)^x)=\Theta(x)2^x$, where $\Theta(x)$ is an arbitrary periodic function with period $2$
$f(x)=\Theta(\log_{-a}x)x^{\log_{-a}2}$, where $\Theta(x)$ is an arbitrary periodic function with period $2$