Audi is fitting up to 850,000 diesel cars with new software to improve emissions performance.