AT&T is selling its majority stake in DirecTV to private equity firm TPG Partners for $7.6 billion, ending the communication giant’s remaining ties to the entertainment industry.