Apple buys chipmaker for iPhones, iPods