Cirrus Logic (CRUS 1.04%) reported its fourth-quarter earnings last week, delighting investors on strong results from Apple (AAPL -0.06%). What's more, the company was able to improve its gross margin significantly despite pricing pressure from its largest customer. As a result the nearly $7 million revenue beat, translated into about $6 million more than analysts' expected net income.

Although the company is working to diversify away from Apple with its purchase of Wolfson Microelectronics, it's still and will remain heavily reliant on Apple as a customer. The Fool's Evan Niu estimates Cirrus will still generate 60% to 70% of revenue from Apple going forward after the deal.

Let's examine Cirrus' relationship with Apple a bit closer by taking a look at both company's earnings results from last quarter.

Apple's gross margin improved, so did Cirrus'
Apple expanded its gross margin 1.8 percentage points in its second quarter. Meanwhile, Cirrus improved its gross margin 8.6 percentage points from the year-ago period. At first glance, these two numbers appear to conflict with one another.

Asked about Apple's gross margin improvement on the conference call, VP of Finance Luca Maestri noted that the electronics giant "had better than anticipated costs." One might assume the costs are associated with Apple's suppliers, which the company has been putting pricing pressure on over the last year. That's what's driven down Cirrus' gross margin results.

Looking closely at Apple's 10-Q, however, it touches on the factors that led to the gross margin expansion. In regards to cost savings, Apple benefited from "lower commodity costs, and improved leverage on fixed costs from higher net sales." In other words, Apple benefited from the decline in price for things like aluminum, and its fixed costs remained stable.

The biggest benefit to Apple's gross margin is the biggest benefit to Cirrus' top line. What Maestri didn't mention on the conference call was exactly how Apple's product mix affected its gross margin. The company reported better than expected iPhone sales, but iPad sales missed the mark. iPhones command a higher average selling price, or ASP, than iPads, and only cost marginally more to make. For every iPad sale replaced by an iPhone sale, Apple's gross margin increases.

The skewed mix toward iPhones also benefits Cirrus. The chipmaker lost an amplifier socket in the iPad Air to a competitor, which means its revenue per iPad unit declined slightly.

Cirrus CEO John Rodes stated on the company's earnings call that "generally [amplifiers] are not a huge business for us, but they are important." Although the amplifier socket doesn't drive revenue as much as Cirrus' CODEC chips, the revenue is still significant.

When Cirrus controlled the iPad amplifier socket, it grossed about $1 per unit. The iPhone adds about $0.50 per unit to Cirrus' top line. The iPhone beat estimates by about 6 million units, while the iPad missed by nearly 3 million units. Although it's not clear what the mix was between iPad Air (no Cirrus amp) and iPad mini (Cirrus amp) units, the overall mix between iPads and iPhones certainly produced a net positive for Cirrus' top line

Cirrus also benefited from higher sales of energy products, which carry a larger gross margin.

Can it keep growing smartphones?
Apple's iPhone unit sales grew 17% year over year. That's quite impressive considering its sizable position in the slowing market. The company has the potential, though, to continue growing its smartphone sales.

Apple outpaced the overall smartphone market in China last quarter. It ought to be able to continue that trend on the strength of its deals with carriers until its next product refresh cycle. The iPhone 6 release may include a large-screen iPhone, which would theoretically boost sales in every market. Additionally, the typical price drop for the 4G-enabled iPhone 5c should boost sales in China where 4S sales are hampered by incompatibility with the most popular 3G network.

Indeed, iPhone sales look strong for the foreseeable future. Cirrus will be an obvious beneficiary of Apple's sales of sales. The ability for Cirrus to win the amp socket in a large-form iPhone was called into question on the conference call, but considering it held the socket in the iPad mini, a phablet shouldn't pose much of a risk for that likely design win. As such, investors can expect Cirrus to return to improving revenue. For now, the price pressure from Apple appears to have dissipated.