The custody battle over Sam Nelson, son of the late singer Rick Nelson, came to an end yesterday when the boy's mother and her brother, actor Mark Harmon, reached an agreement that gives the mother custody of Sam and allows Harmon visitation rights. Harmon and his wife, actress Pam Dawber, brought the court action in an effort to win custody of the 12-year-old boy on grounds that his mother, Kristin Nelson, was unable to take care of him because she was dependent on drugs.

The agreement, which was reached after a full day of closed-door conferences involving Harmon, Nelson, Sam and the judge hearing the case, also requires the entire family to undergo counseling. An attorney for Nelson said his client, who was recently releasd from a drug rehabilitation program, and Harmon, formerly of "St. Elsewhere" and star of the new movie "Summer School," agreed to the settlement because the case "was tearing the family apart."

Out and About The hearing rooms on Capitol Hill are used for less interesting purposes, but this fall famed lyricist Hal David will be moderating a songwriters' workshop for the American Society of Composers, Authors & Publishers in the Caucus Room of the Cannon House Office Building. David, a former ASCAP president, has written such well-known standards as "Raindrops Keep Fallin' on My Head," "Alfie," "Do You Know the Way to San Jose" and "To All the Girls I've Loved Before" ...

Oct. 9 at the National Air and Space Museum, Sen. Jake Garn (R-Utah), a Smithsonian regent, will present the National Air and Space Trophies. This year's winners include pilots Dick Rutan and Jeana Yeager, who in 1986 flew the lightweight Voyager aircraft around the world without stopping or refueling. The other honoree will be John E. Steiner, corporate vice president of product development for the Boeing Co. He is the man who led the team that developed the 727 airliner, and has been active in the development, design, testing and evaluation of virtually all Boeing airplanes ...

U2, which in the last couple of years has emerged as the hottest rock group in the world, is coming to RFK Stadium for a concert Sept. 20 as part of a 35-city tour ...

And Fleetwood Mac has announced a major tour that will bring the group to the Capital Centre on Oct. 8. Fleetwood Mac, one of the most popular groups of the 1970s, was the first rock group to have a single album ("Rumours") that sold more than 10 million copies ...

Former Washingtonian Shelly Burch, daughter of former Republican National Committee chairman Dean Burch, will be making her jazz singing debut Sept. 20 at Blues Alley. Burch, a graduate of Walt Whitman High School, plays Delilah Buchanan on the afternoon soap "One Life to Live" ...

It's not exactly a car one would use to run down to the Pizza Hut for dinner, but Greta Garbo's 1933 Duesenberg is going on the auction block in Lake George, N.Y., and is expected to sell for a paltry $2 million. The recently restored car -- custom made for Garbo in Paris -- reportedly has eight hidden compartments where Garbo stashed her gems and has a drop-down makeup credenza with mirrors. The previous owner of the car, who donated it to a museum in Glens Falls, N.Y., quoted Garbo as saying when she sold the car for $90,000 in 1972 that she couldn't understand why anyone would pay such a large amount since it "gets terrible mileage" ...

As a television reporter, Geraldo Rivera is a great showman. He arranged for heavy security during his live, syndicated telecast Monday of "Sons of Scarface: The New Mafia" at the Times Square Studios. There were armed guards everywhere, and the audience had to pass through metal detectors because the show featured interviews with protected witnesses, law enforcement officials and attorneys for alleged mobsters. No one was caught with any unauthorized weapons, but at one point the alarm went off. It was just Rivera carrying in a change of clothes and the hanger set off the metal detector ...